mirror of
git://git.tartarus.org/simon/puzzles.git
synced 2025-04-21 08:01:30 -07:00
Revert a change in an assertion made in r6299. It was right the
first time, and now has a comment explaining why! [originally from svn r6511] [r6299 == c389f623f66fe5296f7ef5c66d88884607b82cff]
This commit is contained in:
10
loopy.c
10
loopy.c
@ -1210,8 +1210,14 @@ static char *encode_solve_move(const game_state *state)
|
||||
}
|
||||
}
|
||||
|
||||
/* No point in doing sums like that if they're going to be wrong */
|
||||
assert(strlen(ret) == (size_t)len);
|
||||
/*
|
||||
* Ensure we haven't overrun the buffer we allocated (which we
|
||||
* really shouldn't have, since we computed its maximum size).
|
||||
* Note that this assert is <= rather than ==, because the
|
||||
* solver is permitted to produce an incomplete solution in
|
||||
* which case the buffer will be only partially used.
|
||||
*/
|
||||
assert(strlen(ret) <= (size_t)len);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user