ratox

FIFO based tox client
git clone git://git.2f30.org/ratox
Log | Files | Refs | README | LICENSE

commit b35b99442c64271effc44e65a9c422042ab5c1b2
parent f914348f72eaac50d39f728a641d05ef1fb1150f
Author: sin <sin@2f30.org>
Date:   Wed,  1 Oct 2014 17:09:41 +0100

Don't use magic numbers :)

Diffstat:
Mratox.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 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; }