소스 검색

Merge pull request #2265 from OTHGMars/vmParseFromString

Fix for bug in GFXVideoMode::parseFromString()
Areloch 7 년 전
부모
커밋
cc906b95c2
1개의 변경된 파일3개의 추가작업 그리고 1개의 파일을 삭제
  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")