The return value from lex_tokstr() is only valid until the next call to
lex_get() (or another function that changes the current token), so don't
advance past the token until we're done with its string value.
/* PSPP - a program for statistical analysis.
- Copyright (C) 1997-9, 2000, 2006 Free Software Foundation, Inc.
+ Copyright (C) 1997-9, 2000, 2006, 2009 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
s = lex_tokstr (lexer);
- lex_get (lexer);
-
/* First try this string as an encoding name */
if ( valid_encoding (ds_cstr (s)))
set_default_encoding (ds_cstr (s));
return 0;
}
+ lex_get (lexer);
+
return 1;
}