From 501f86eb6e6dfc4c4006d6a99687c4c9756f30b8 Mon Sep 17 00:00:00 2001 From: Jiri Malak Date: Wed, 5 Jun 2024 00:56:24 +0200 Subject: [PATCH] nwlib: cleanup code --- bld/nwlib/c/implib.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bld/nwlib/c/implib.c b/bld/nwlib/c/implib.c index 9236ddbcbd..2e3d719adc 100644 --- a/bld/nwlib/c/implib.c +++ b/bld/nwlib/c/implib.c @@ -466,9 +466,10 @@ static void peAddImport( libfile io, long header_offset, const arch_header *arch static char *GetImportString( char **rawpntr, const char *original ) { bool quote = false; - char *raw = *rawpntr; + char *raw; char *result; + raw = *rawpntr; if( *raw == '\'' ) { quote = true; ++raw; @@ -476,7 +477,7 @@ static char *GetImportString( char **rawpntr, const char *original ) result = raw; - while( *raw && (quote || (*raw != '.')) ) { + while( *raw != '\0' && (quote || (*raw != '.')) ) { if( quote && (*raw == '\'') ) { quote = false;