X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=misc.c;h=6f33146c2020ef74badb4ef85b8e89998fe334d7;hb=a6657a53e9613505b116eeaac15cfa9f9696fab5;hp=71f1214230304c1bda962c2bf109b216a38bd808;hpb=fa74e8054bfe6743c7cdfd3228ede2f174bf7aa1;p=open-adventure.git diff --git a/misc.c b/misc.c index 71f1214..6f33146 100644 --- a/misc.c +++ b/misc.c @@ -27,7 +27,7 @@ void packed_to_token(long packed, char token[6]) for (int i = 0; i < 5; ++i) { char advent = (packed >> i * 6) & 63; - token[4 - i] = advent_to_ascii[advent]; + token[4 - i] = advent_to_ascii[(int) advent]; } // Ensure the last character is \0. @@ -367,7 +367,7 @@ void MOVE(long object, long where) from=game.fixed[object-NOBJECTS]; else from=game.place[object]; - if (from > 0 && from <= 300) + if (from > 0 && !SPECIAL(from)) CARRY(object,from); DROP(object,where); } @@ -561,9 +561,9 @@ bool MAPLIN(FILE *fp) * in which you want to echo commands. One is when shipping them to * a log under the -l option, in which case you want to suppress * prompt generation (so test logs are unadorned command sequences). - * On the other hand, if you redireceted stdin and are feeding the program + * On the other hand, if you redirected stdin and are feeding the program * a logfile, you *do* want prompt generation - it makes checkfiles - * easier to read when the commands are maked by a preceding prompt. + * easier to read when the commands are marked by a preceding prompt. */ do { if (!editline) { @@ -648,7 +648,7 @@ void TYPE(void) } for (i=1; i<=LNLENG; i++) { - INLINE[i]=advent_to_ascii[INLINE[i]]; + INLINE[i]=advent_to_ascii[(int) INLINE[i]]; } INLINE[LNLENG+1]=0; printf("%s\n", INLINE+1);