変愚蛮怒のメインリポジトリです
Revision | c5a2ea5345943a29edd05f4ee09c312c2e579a8c (tree) |
---|---|
Time | 2014-03-06 18:23:42 |
Author | Habu <habu@user...> |
Commiter | Habu |
avoid assertion of argument range in function isprint()
VSのDebugモードでコンパイルするとモンスターの思い出表示等で2バイト文字の片割れを
isprint()に渡してしまい、引数範囲のassertionにひっかかってしまうので、2バイト文字か
どうかの判定をisprint()より先に移動し、2バイト文字ならisprint()が呼ばれないようにした。
@@ -3151,7 +3151,7 @@ void c_roff(byte a, cptr str) | ||
3151 | 3151 | |
3152 | 3152 | /* Clean up the char */ |
3153 | 3153 | #ifdef JP |
3154 | - ch = ((isprint(*s) || k_flag) ? *s : ' '); | |
3154 | + ch = ((k_flag || isprint(*s)) ? *s : ' '); | |
3155 | 3155 | #else |
3156 | 3156 | ch = (isprint(*s) ? *s : ' '); |
3157 | 3157 | #endif |