Browse Source

Prevent crash if s == NULL

pre-master-46
Holger Vogt 3 years ago
parent
commit
d46cd894cc
  1. 2
      src/frontend/numparam/xpressn.c

2
src/frontend/numparam/xpressn.c

@ -1395,6 +1395,8 @@ nupa_assignment(dico_t *dico, const char *s, char mode)
bug: we cannot rely on the transformed line, must re-parse everything! bug: we cannot rely on the transformed line, must re-parse everything!
*/ */
{ {
if (!s || !*s)
return 1;
/* s has the format: ident = expression; ident= expression ... */ /* s has the format: ident = expression; ident= expression ... */
const char * const s_end = s + strlen(s); const char * const s_end = s + strlen(s);
const char *p = s; const char *p = s;

Loading…
Cancel
Save