silence compiler warning about singed vs. unsigned

This commit is contained in:
Axel Kohlmeyer
2018-11-28 22:23:09 -05:00
parent cb2964af4c
commit 78f86d5f16

View File

@ -174,9 +174,9 @@ void Universe::add_world(char *str)
// str may not be empty and may only consist of digits or 'x'
int len = strlen(str);
size_t len = strlen(str);
if (len < 1) valid = false;
for (int i=0; i < len; ++i)
for (size_t i=0; i < len; ++i)
if (isdigit(str[i]) || str[i] == 'x') continue;
else valid = false;