From: j8takagi Date: Wed, 6 Feb 2019 12:57:29 +0000 (+0900) Subject: ソースの推敲 X-Git-Tag: v0.5p3~12 X-Git-Url: http://j8takagi.net/cgi-bin/gitweb.cgi?p=YACASL2.git;a=commitdiff_plain;h=72bc2e894cc2816990ffeee99004a9a8017692f9 ソースの推敲 --- diff --git a/src/dump.c b/src/dump.c index d00d274..45f6706 100644 --- a/src/dump.c +++ b/src/dump.c @@ -39,7 +39,7 @@ void dspregister() char *sp, *pr, *fr; for(i = 0; i < GRSIZE; i++ ) { fprintf(stdout, "#%04X: GR%d: ", sys->cpu->pr, i); - print_dumpword(sys->cpu->gr[i], (&execmode)->logical); + print_dumpword(sys->cpu->gr[i], execmode.logical); fprintf(stdout, "\n"); } fprintf(stdout, "#%04X: SP: %6d = #%04X = %s\n", diff --git a/src/struct.c b/src/struct.c index 22a7df3..cc4d986 100644 --- a/src/struct.c +++ b/src/struct.c @@ -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;