• R/O
  • HTTP
  • SSH
  • HTTPS

hengband: Commit

変愚蛮怒のメインリポジトリです


Commit MetaInfo

Revisionc5a2ea5345943a29edd05f4ee09c312c2e579a8c (tree)
Time2014-03-06 18:23:42
AuthorHabu <habu@user...>
CommiterHabu

Log Message

avoid assertion of argument range in function isprint()

VSのDebugモードでコンパイルするとモンスターの思い出表示等で2バイト文字の片割れを
isprint()に渡してしまい、引数範囲のassertionにひっかかってしまうので、2バイト文字か
どうかの判定をisprint()より先に移動し、2バイト文字ならisprint()が呼ばれないようにした。

Change Summary

Incremental Difference

--- a/src/util.c
+++ b/src/util.c
@@ -3151,7 +3151,7 @@ void c_roff(byte a, cptr str)
31513151
31523152 /* Clean up the char */
31533153 #ifdef JP
3154- ch = ((isprint(*s) || k_flag) ? *s : ' ');
3154+ ch = ((k_flag || isprint(*s)) ? *s : ' ');
31553155 #else
31563156 ch = (isprint(*s) ? *s : ' ');
31573157 #endif
Show on old repository browser