X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=src%2Fcc65%2Fscanstrbuf.c;h=f55f52a6454d791172b6d6f68a8a3b1c6b588ff6;hb=112ae0e3db511ddd92e769c11328646ebe2a6240;hp=d33f88a258f5f40d351fa9786bd6c42ea54eced2;hpb=a1fb355a9ab6058b3b353eec4509608d431c7995;p=cc65 diff --git a/src/cc65/scanstrbuf.c b/src/cc65/scanstrbuf.c index d33f88a25..f55f52a64 100644 --- a/src/cc65/scanstrbuf.c +++ b/src/cc65/scanstrbuf.c @@ -185,7 +185,8 @@ int SB_GetSym (StrBuf* B, StrBuf* Ident, const char* SpecialChars) SB_AppendChar (Ident, C); SB_Skip (B); C = SB_Peek (B); - } while (IsIdent (C) || IsDigit (C) || strchr (SpecialChars, C) != 0); + } while (IsIdent (C) || IsDigit (C) || + (C != '\0' && strchr (SpecialChars, C) != 0)); SB_Terminate (Ident); return 1; } else {