fix a crash when selling nothing.

build 687
This commit is contained in:
Enno Rehling 2014-10-25 23:54:01 +02:00
parent adcd4ec1c6
commit f3e54e103a
2 changed files with 2 additions and 2 deletions

View File

@ -1,3 +1,3 @@
#define VERSION_MAJOR 3
#define VERSION_MINOR 3
#define VERSION_BUILD 686
#define VERSION_BUILD 687

View File

@ -2389,7 +2389,7 @@ static bool sell(unit * u, request ** sellorders, struct order *ord)
}
}
else {
n = atoi((const char *)s);
n = s ? atoi(s) : 0;
if (n == 0) {
cmistake(u, ord, 27, MSG_COMMERCE);
return false;