Commit 34e22388 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Fix segfault

parent 0bf89973
...@@ -128,7 +128,7 @@ mvar_t *E_(mvar_GetVar)( mvar_t *s, const char *name ) ...@@ -128,7 +128,7 @@ mvar_t *E_(mvar_GetVar)( mvar_t *s, const char *name )
{ {
/* format: name[index].field */ /* format: name[index].field */
char *field = strchr( name, '.' ); char *field = strchr( name, '.' );
int i = 1 + (field != NULL) ? (field - name) : strlen( name ); int i = 1 + ((field != NULL) ? (field - name) : strlen( name ));
char base[i]; char base[i];
char *p; char *p;
int i_index; int i_index;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment