aboutsummaryrefslogtreecommitdiffstats
path: root/st.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-10-16 21:18:09 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-10-16 21:18:09 +0000
commit5daecbc0e14f840059db48f34f6b000df54c40cc (patch)
tree17000a6dc4a3f3da9ef98fda3e573812dd0246b6 /st.c
parentde46b903a9f202952d0b84b0642cf98cdd4f8fa9 (diff)
downloadruby-5daecbc0e14f840059db48f34f6b000df54c40cc.tar.gz
* encoding.c (rb_enc_alias, rb_enc_find_index): changed
enc_table_alias to a name-to-index hash. * encoding.c (rb_enc_init): use upper case names for aliases to use as constant names. * encoding.c (enc_find): allow symbols. * encoding.c (Init_Encoding): define encoding constants. * st.c (strcasehash): fix wrong code range condition. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13731 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'st.c')
-rw-r--r--st.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/st.c b/st.c
index 2418547ebb..5efd57e439 100644
--- a/st.c
+++ b/st.c
@@ -842,7 +842,7 @@ strcasehash(register const char *string)
*/
while (*string) {
unsigned int c = (unsigned char)*string++;
- if ((unsigned int)(c - 'A') > ('Z' - 'A')) c += 'a' - 'A';
+ if ((unsigned int)(c - 'A') <= ('Z' - 'A')) c += 'a' - 'A';
hval ^= c;
/* multiply by the 32 bit FNV magic prime mod 2^32 */