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 {