mirror of https://github.com/OpenRCT2/OpenRCT2.git
Merge pull request #1409 from trigger-death/console-fix
Fixed console open and set commands
This commit is contained in:
commit
6dbdce88d4
|
@ -318,14 +318,14 @@ void console_printf(const char *format, ...)
|
|||
int console_parse_int(const char *src, bool *valid) {
|
||||
char *end;
|
||||
int value;
|
||||
value = strtol(src, &end, 10); *valid &= (*end == '\0');
|
||||
value = strtol(src, &end, 10); *valid = (*end == '\0');
|
||||
return value;
|
||||
}
|
||||
|
||||
double console_parse_double(const char *src, bool *valid) {
|
||||
char *end;
|
||||
double value;
|
||||
value = strtod(src, &end); *valid &= (*end == '\0');
|
||||
value = strtod(src, &end); *valid = (*end == '\0');
|
||||
return value;
|
||||
}
|
||||
|
||||
|
@ -1030,7 +1030,9 @@ void console_execute_silent(const char *src)
|
|||
|
||||
static bool invalidArguments(bool *invalid, bool arguments)
|
||||
{
|
||||
if (!arguments)
|
||||
if (!arguments) {
|
||||
*invalid = true;
|
||||
return !invalid;
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
Loading…
Reference in New Issue