wizkit fgets() buffer size

also ignore lines where we didn't read a newline within BUFSZ characters
This commit is contained in:
nethack.allison
2003-02-19 06:14:47 +00:00
parent 1284e86476
commit 0e2630f817

View File

@@ -2071,9 +2071,9 @@ read_wizkit()
if (!wizard || !(fp = fopen_wizkit_file())) return;
while (fgets(buf, 4*BUFSZ, fp)) {
while (fgets(buf, BUFSZ, fp)) {
if ((ep = index(buf, '\n'))) *ep = '\0';
if (buf[0]) {
if (ep && buf[0]) {
otmp = readobjnam(buf, (struct obj *)0, FALSE);
if (otmp) {
if (otmp != &zeroobj)