Skip to content

Commit f315caa

Browse files
committed
fix a bug, and use Error instead of Warning since this indicates a programming error
1 parent b5a47e6 commit f315caa

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

code/parse/sexp.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4094,7 +4094,7 @@ int eval_nums(int &n, bool &is_nan, bool &is_nan_forever, char arg_type, void *a
40944094
else if (arg_type == 'd')
40954095
*(static_cast<double*>(arg)) = static_cast<double>(val);
40964096
else
4097-
Warning(LOCATION, "Unrecognized character %c in eval_nums!", arg_type);
4097+
Error(LOCATION, "Unrecognized character %c in eval_nums!", arg_type);
40984098

40994099
return retval;
41004100
}
@@ -4117,7 +4117,7 @@ int eval_nums(int &n, bool &is_nan, bool &is_nan_forever, const char *arg_types,
41174117
va_start(args, arg_types);
41184118

41194119
// iterate along the parameter list
4120-
for (const char *ch = arg_types; ch != '\0'; ch++)
4120+
for (const char *ch = arg_types; *ch != '\0'; ++ch)
41214121
{
41224122
// just grab the pointer for now; we will figure out its type in the sub-function
41234123
void *arg = va_arg(args, void*);

0 commit comments

Comments
 (0)