summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsin <sin@2f30.org>2014-10-01 17:09:41 +0100
committersin <sin@2f30.org>2014-10-01 17:09:41 +0100
commitb35b99442c64271effc44e65a9c422042ab5c1b2 (patch)
tree854297573b2cf0d3ed5c3e634dc40174ab14090d
parentf914348f72eaac50d39f728a641d05ef1fb1150f (diff)
Don't use magic numbers :)
-rw-r--r--ratox.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ratox.c b/ratox.c
index 48c6bc5..b0d7dc7 100644
--- a/ratox.c
+++ b/ratox.c
@@ -1354,7 +1354,7 @@ setnospam(void *data)
nospam[n] = '\0';
for (i = 0; i < n - 1; i++) {
- if (nospam[i] < 48 || (nospam[i] > 57 && nospam[i] < 65) || nospam[i] > 70) {
+ if (nospam[i] < '0' || (nospam[i] > '9' && nospam[i] < 'A') || nospam[i] > 'F') {
dprintf(gslots[NOSPAM].fd[ERR], "Input contains invalid characters ![0-9, A-F]\n");
goto end;
}