diff options
author | Eugene Sandulenko | 2016-10-06 23:37:48 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2016-10-06 23:49:39 +0200 |
commit | cd375ae5b328a356f20696ca9c5d21bc827e1ca9 (patch) | |
tree | 0f7bfd1c3296c3687a90dd30c58e4ef220c3bb28 | |
parent | dff5da9b496356cfb0cab7d7493c8bb8e18c4493 (diff) | |
download | scummvm-rg350-cd375ae5b328a356f20696ca9c5d21bc827e1ca9.tar.gz scummvm-rg350-cd375ae5b328a356f20696ca9c5d21bc827e1ca9.tar.bz2 scummvm-rg350-cd375ae5b328a356f20696ca9c5d21bc827e1ca9.zip |
DEVTOOLS: Fix convbdf font parsing
-rw-r--r-- | devtools/convbdf.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/devtools/convbdf.cpp b/devtools/convbdf.cpp index 4a7545834a..a3196a9a94 100644 --- a/devtools/convbdf.cpp +++ b/devtools/convbdf.cpp @@ -164,14 +164,14 @@ int main(int argc, char *argv[]) { memset(font.bitmaps, 0, sizeof(unsigned char *) * font.numCharacters); font.advances = new unsigned char[font.numCharacters]; font.boxes = new BdfBoundingBox[font.numCharacters]; - } else if (hasPrefix(line, "FACE_NAME \"")) { + } else if (hasPrefix(line, "FAMILY_NAME \"")) { font.familyName = new char[line.size()]; // We will definitely fit here - strncpy(font.familyName, &line.c_str()[11], line.size() - 1); + strncpy(font.familyName, &line.c_str()[13], line.size() - 1); char *p = &font.familyName[strlen(font.familyName)]; while (p != font.familyName && *p != '"') p--; if (p == font.familyName) - error("Invalid FACE_NAME"); + error("Invalid FAMILY_NAME"); *p = '\0'; // Remove last quote } else if (hasPrefix(line, "FONT_ASCENT ")) { if (sscanf(line.c_str(), "FONT_ASCENT %d", &font.ascent) != 1) |