diff --git a/shf.c b/shf.c index ac01d0c..18e987d 100644 --- a/shf.c +++ b/shf.c @@ -25,7 +25,7 @@ #include "sh.h" -__RCSID("$MirOS: src/bin/mksh/shf.c,v 1.92 2017/04/28 11:31:53 tg Exp $"); +__RCSID("$MirOS: src/bin/mksh/shf.c,v 1.93 2017/05/03 17:51:06 tg Exp $"); /* flags to shf_emptybuf() */ #define EB_READSW 0x01 /* about to switch to reading */ @@ -1274,5 +1274,9 @@ ebcdic_init(void) } else ebcdic_map[i] = (unsigned short)(0x100U | ord(i)); } + if (ebcdic_rtt_toascii[0] || ebcdic_rtt_fromascii[0] || ebcdic_map[0]) { + write(2, "mksh: NUL not at position 0\n", 28); + exit(255); + } } #endif