mirror of
https://github.com/ondra-novak/gates_of_skeldal.git
synced 2025-07-05 06:00:33 -04:00
Merge branch 'main' of https://github.com/ondra-novak/gates_of_skeldal
into main
This commit is contained in:
parent
73b949fb2e
commit
f67cfbcd24
11 changed files with 178 additions and 30 deletions
|
@ -96,11 +96,11 @@ long ini_get_value_int(const char *value, int *conv_ok) {
|
|||
if (value != NULL) {
|
||||
long ret = strtol(value, &out, 10);
|
||||
if (*out == 0) {
|
||||
if (*conv_ok) *conv_ok = 1;
|
||||
if (conv_ok) *conv_ok = 1;
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
if (*conv_ok) *conv_ok = 0;
|
||||
if (conv_ok) *conv_ok = 0;
|
||||
return -1;
|
||||
|
||||
}
|
||||
|
@ -110,11 +110,11 @@ double ini_get_value_double(const char *value, int *conv_ok) {
|
|||
if (value != NULL) {
|
||||
double ret = strtod(value, &out);
|
||||
if (*out == 0) {
|
||||
if (*conv_ok) *conv_ok = 1;
|
||||
if (conv_ok) *conv_ok = 1;
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
if (*conv_ok) *conv_ok = 0;
|
||||
if (conv_ok) *conv_ok = 0;
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue