diff options
Diffstat (limited to 'engines/scumm/util.cpp')
-rw-r--r-- | engines/scumm/util.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/engines/scumm/util.cpp b/engines/scumm/util.cpp index 480dc01ba0..a0f3b05c5e 100644 --- a/engines/scumm/util.cpp +++ b/engines/scumm/util.cpp @@ -29,11 +29,9 @@ namespace Scumm { #pragma mark --- Utilities --- #pragma mark - -void checkRange(int max, int min, int no, const char *str) { - if (no < min || no > max) { - char buf[256]; - snprintf(buf, sizeof(buf), str, no); - error("Value %d is out of bounds (%d,%d) (%s)", no, min, max, buf); +void assertRange(int min, int value, int max, const char *desc) { + if (value < min || value > max) { + error("%s %d is out of bounds (%d,%d)", desc, value, min, max); } } |