diff options
| author | 2011-06-05 15:36:27 +0000 | |
|---|---|---|
| committer | 2011-06-05 15:36:27 +0000 | |
| commit | 6b0e05e4742a5dbc2eae1b7cee023454e929a58b (patch) | |
| tree | 84bad3d16bcda8531aa90eaf488ff0a994ba5676 /src | |
| parent | 87ab11f6d25096107cb08ede54894780f7f1a82a (diff) | |
inpttype: fix lifetime error (nwn)
Diffstat (limited to 'src')
| -rw-r--r-- | src/emu/inptport.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/emu/inptport.c b/src/emu/inptport.c index b8d78d80f54..9449f748e5b 100644 --- a/src/emu/inptport.c +++ b/src/emu/inptport.c @@ -2991,6 +2991,7 @@ void diplocation_list_alloc(input_field_config &field, const char *location, ast field.diploclist().reset(); /* parse the string */ + astring name; // Don't move this variable inside the loop, lastname's lifetime depends on it being outside const char *lastname = NULL; const char *curentry = location; int entries = 0; @@ -3010,7 +3011,6 @@ void diplocation_list_alloc(input_field_config &field, const char *location, ast const char *colon = strchr(tempstr, ':'); /* allocate and copy the name if it is present */ - astring name; if (colon != NULL) { lastname = name.cpy(number, colon - number); |
