Skip to content

Commit

Permalink
wres: fix for correctly read blank resource directory entry (issue #1338
Browse files Browse the repository at this point in the history
)
  • Loading branch information
jmalak committed Oct 10, 2024
1 parent 9149b77 commit ac4dc15
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions bld/wres/c/wrfirres.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
*
* Open Watcom Project
*
* Copyright (c) 2024 The Open Watcom Contributors. All Rights Reserved.
* Portions Copyright (c) 1983-2002 Sybase, Inc. All Rights Reserved.
*
* ========================================================================
Expand Down Expand Up @@ -39,14 +40,20 @@ WResDirWindow WResFirstResource( WResDir currdir )
WResDirWindow wind;

wind.CurrType = currdir->Head;
wind.CurrRes = wind.CurrType->Head;
wind.CurrLang = wind.CurrRes->Head;
if( wind.CurrType != NULL ) {
wind.CurrRes = wind.CurrType->Head;
wind.CurrLang = wind.CurrRes->Head;
} else {
wind.CurrRes = NULL;
wind.CurrLang = NULL;
}

return( wind );
}

void WResSetEmptyWindow( WResDirWindow *wind ) {
/***********************************************/
void WResSetEmptyWindow( WResDirWindow *wind )
/********************************************/
{
if( wind != NULL ) {
wind->CurrType = NULL;
wind->CurrRes = NULL;
Expand Down

0 comments on commit ac4dc15

Please sign in to comment.