X-Git-Url: http://j8takagi.net/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fstruct.c;h=a617cecbcdae949bc3629badf025c92b429b186b;hb=fc19bbf28ea2fdd9e42bc0c93ca49651aef8a752;hp=f6d4128fbfe91036d0c6d7fbacb6e9dd1000d142;hpb=903276ec3fb4522ec83b16ba5068787532b42547;p=YACASL2.git diff --git a/src/struct.c b/src/struct.c index f6d4128..a617cec 100644 --- a/src/struct.c +++ b/src/struct.c @@ -64,7 +64,7 @@ static int comet2cmdsize = ARRAYSIZE(comet2cmd); * ハッシュ表のサイズ */ enum { - CMDTABSIZE = 39, + CMDTABSIZE = 41, }; /** @@ -122,7 +122,7 @@ bool create_cmdtable(CMDTAB_HASH hash) if(hash == HASH_CMDTYPE) { hashval = hash_cmdtype(comet2cmd[i].name, comet2cmd[i].type); } else if(hash == HASH_CODE) { - hashval = hash_code((&comet2cmd[i])->code); + hashval = hash_code(comet2cmd[i].code); } p->next = cmdtab[hash][hashval]; cmdtab[hash][hashval] = p; @@ -141,9 +141,9 @@ void free_cmdtable(CMDTAB_HASH hash) for(i = 0; i < CMDTABSIZE; i++) { for(p = cmdtab[hash][i]; p != NULL; p = q) { q = p->next; - cmdtab[hash][i] = NULL; FREE(p); } + cmdtab[hash][i] = NULL; } }