Browse Source

Merge pull request #2265 from OTHGMars/vmParseFromString

Fix for bug in GFXVideoMode::parseFromString()
Areloch 7 years ago
parent
commit
703ac27cf2
1 changed files with 3 additions and 1 deletions
  1. 3 1
      Engine/source/gfx/gfxStructs.cpp

+ 3 - 1
Engine/source/gfx/gfxStructs.cpp

@@ -49,7 +49,9 @@ void GFXVideoMode::parseFromString( const char *str )
 
    PARSE_ELEM(S32, resolution.x, dAtoi, tempBuf, " x\0")
    PARSE_ELEM(S32, resolution.y, dAtoi, NULL,    " x\0")
-   PARSE_ELEM(S32, fullScreen,   dAtob, NULL,    " \0")
+   const char *boolptr = dStrtok(NULL, " \0");
+   if (boolptr)
+      fullScreen = dAtob(boolptr);
    PARSE_ELEM(S32, bitDepth,     dAtoi, NULL,    " \0")
    PARSE_ELEM(S32, refreshRate,  dAtoi, NULL,    " \0")
    PARSE_ELEM(S32, antialiasLevel, dAtoi, NULL,    " \0")