# HG changeset patch # User Mark Doliner # Date 1176663071 0 # Node ID 6613fb7af427359cb5cbf145da3deb15ae78d248 # Parent a740afef2dafea06d73f3418cefb2a731e684055 Call strtolower() so that we don't have to check against the capital versions of these letters diff -r a740afef2daf -r 6613fb7af427 libpurple/util.c --- a/libpurple/util.c Sun Apr 15 18:50:31 2007 +0000 +++ b/libpurple/util.c Sun Apr 15 18:51:11 2007 +0000 @@ -134,14 +134,14 @@ accumulator |= str[i] - 48; else { - switch(str[i]) + switch(tolower(str[i])) { - case 'a': case 'A': accumulator |= 10; break; - case 'b': case 'B': accumulator |= 11; break; - case 'c': case 'C': accumulator |= 12; break; - case 'd': case 'D': accumulator |= 13; break; - case 'e': case 'E': accumulator |= 14; break; - case 'f': case 'F': accumulator |= 15; break; + case 'a': accumulator |= 10; break; + case 'b': accumulator |= 11; break; + case 'c': accumulator |= 12; break; + case 'd': accumulator |= 13; break; + case 'e': accumulator |= 14; break; + case 'f': accumulator |= 15; break; } }