Kaydet (Commit) 57ef375b authored tarafından Caolán McNamara's avatar Caolán McNamara

ptr is just added to offset, so move addition into 2nd arg

Change-Id: Ia3e8145c69324f19aeec8b0dd97284ec382d20d7
üst 37be7a3f
...@@ -2556,12 +2556,12 @@ int GetTTNameRecords(TrueTypeFont *ttf, NameRecord **nr) ...@@ -2556,12 +2556,12 @@ int GetTTNameRecords(TrueTypeFont *ttf, NameRecord **nr)
NameRecord* rec = (NameRecord*)calloc(n, sizeof(NameRecord)); NameRecord* rec = (NameRecord*)calloc(n, sizeof(NameRecord));
for (i = 0; i < n; i++) { for (i = 0; i < n; i++) {
int nStrOffset = GetUInt16(table + 6, 10 + 12 * i, 1); int nStrOffset = GetUInt16(table, 6 + 10 + 12 * i, 1);
rec[i].platformID = GetUInt16(table + 6, 12 * i, 1); rec[i].platformID = GetUInt16(table, 6 + 12 * i, 1);
rec[i].encodingID = GetUInt16(table + 6, 2 + 12 * i, 1); rec[i].encodingID = GetUInt16(table, 6 + 2 + 12 * i, 1);
rec[i].languageID = GetUInt16(table + 6, 4 + 12 * i, 1); rec[i].languageID = GetUInt16(table, 6 + 4 + 12 * i, 1);
rec[i].nameID = GetUInt16(table + 6, 6 + 12 * i, 1); rec[i].nameID = GetUInt16(table, 6 + 6 + 12 * i, 1);
rec[i].slen = GetUInt16(table + 6, 8 + 12 * i, 1); rec[i].slen = GetUInt16(table, 6 + 8 + 12 * i, 1);
if (rec[i].slen) { if (rec[i].slen) {
if( nStrBase+nStrOffset+rec[i].slen >= nTableSize ) { if( nStrBase+nStrOffset+rec[i].slen >= nTableSize ) {
rec[i].sptr = 0; rec[i].sptr = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment