diff --git a/src/hardware/parport/printer.cpp b/src/hardware/parport/printer.cpp index 0ad8aa77e08..a7322351375 100644 --- a/src/hardware/parport/printer.cpp +++ b/src/hardware/parport/printer.cpp @@ -1136,7 +1136,7 @@ bool CPrinter::processCommandChar(uint8_t ch) numParam = 0; break; case 0x274: // Assign character table (ESC (t) - if (params[2] < 4 && params[3] < 16) + if (params[2] < 4 && params[3] < 15) { charTables[params[2]] = codepages[params[3]]; //LOG_MSG("curr table: %d, p2: %d, p3: %d",curCharTable,params[2],params[3]); diff --git a/src/output/direct3d/direct3d.cpp b/src/output/direct3d/direct3d.cpp index a9044dd50f3..a400176bdf5 100644 --- a/src/output/direct3d/direct3d.cpp +++ b/src/output/direct3d/direct3d.cpp @@ -1413,7 +1413,7 @@ HRESULT CDirect3D::CreateDisplayTexture(void) // Set textures if(FAILED(psEffect->SetTextures(lpTexture, lpWorkTexture1, lpWorkTexture2, lpHq2xLookupTexture))) { LOG_MSG("D3D:Failed to set PS textures"); - return false; + return E_FAIL; } } diff --git a/vs/sdl/src/main/win32/SDL_win32_main.c b/vs/sdl/src/main/win32/SDL_win32_main.c index a87cac1449b..2744b3222aa 100644 --- a/vs/sdl/src/main/win32/SDL_win32_main.c +++ b/vs/sdl/src/main/win32/SDL_win32_main.c @@ -59,7 +59,7 @@ static void UnEscapeQuotes( char *arg ) char *last = NULL; while( *arg ) { - if( *arg == '"' && *last == '\\' ) { + if( *arg == '"' && last && *last == '\\' ) { char *c_curr = arg; char *c_last = last; diff --git a/vs/sdl/src/video/SDL_yuv.c b/vs/sdl/src/video/SDL_yuv.c index eea3347b20d..d10b9baa39a 100644 --- a/vs/sdl/src/video/SDL_yuv.c +++ b/vs/sdl/src/video/SDL_yuv.c @@ -123,7 +123,7 @@ int SDL_DisplayYUVOverlay(SDL_Overlay *overlay, SDL_Rect *dstrect) dsth -= extra; } if ( srcw <= 0 || srch <= 0 || - srch <= 0 || dsth <= 0 ) { + dstw <= 0 || dsth <= 0 ) { return 0; } /* Ugh, I can't wait for SDL_Rect to be int values */