Skip to content

Commit

Permalink
Merge pull request #4391 from mjunix/small-fixes
Browse files Browse the repository at this point in the history
Small fixes
  • Loading branch information
joncampbell123 authored Jul 30, 2023
2 parents 2615e65 + cd5a96b commit e0afb06
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/hardware/parport/printer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
Expand Down
2 changes: 1 addition & 1 deletion src/output/direct3d/direct3d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

}
Expand Down
2 changes: 1 addition & 1 deletion vs/sdl/src/main/win32/SDL_win32_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion vs/sdl/src/video/SDL_yuv.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit e0afb06

Please sign in to comment.