… | |
… | |
958 | randomitems = 0; |
958 | randomitems = 0; |
959 | break; |
959 | break; |
960 | |
960 | |
961 | case KW_msg: |
961 | case KW_msg: |
962 | f.get_ml (KW_endmsg, msg); |
962 | f.get_ml (KW_endmsg, msg); |
963 | //TODO: allow longer messages |
|
|
964 | if (strlen (msg) >= HUGE_BUF) |
|
|
965 | { |
|
|
966 | LOG (llevDebug, "\tError message length >= %d: %d\n>%.80s<\n", HUGE_BUF, strlen (msg), &msg); |
|
|
967 | msg = "ERROR, please report: string too long, winged.\n"; |
|
|
968 | } |
|
|
969 | break; |
963 | break; |
970 | |
964 | |
971 | case KW_lore: |
965 | case KW_lore: |
972 | f.get_ml (KW_endlore, lore); |
966 | f.get_ml (KW_endlore, lore); |
973 | //TODO: allow longer messages |
|
|
974 | /* Just print a warning so we can be reasonably safe |
|
|
975 | * about not overflowing the buffer. |
|
|
976 | */ |
|
|
977 | if (strlen (lore) > (HUGE_BUF / 2)) |
|
|
978 | LOG (llevDebug, "\tWarning lore length > %d (max allowed=%d): %d\n>%.80s<\n", |
|
|
979 | HUGE_BUF / 2, HUGE_BUF, strlen (lore), &lore); |
|
|
980 | break; |
967 | break; |
981 | |
968 | |
982 | case KW_editable: |
969 | case KW_editable: |
983 | case KW_editor_folder: |
970 | case KW_editor_folder: |
984 | break; |
971 | break; |
… | |
… | |
1295 | if (op->animation_id) |
1282 | if (op->animation_id) |
1296 | { |
1283 | { |
1297 | f.put (KW_animation, animations[GET_ANIM_ID (op)].name); |
1284 | f.put (KW_animation, animations[GET_ANIM_ID (op)].name); |
1298 | |
1285 | |
1299 | if (!QUERY_FLAG (op, FLAG_ANIMATE)) |
1286 | if (!QUERY_FLAG (op, FLAG_ANIMATE)) |
1300 | f.put (KW_is_animated, (sint32) 0); |
1287 | f.put (KW_is_animated, (sint32)0); |
1301 | } |
1288 | } |
1302 | else |
1289 | else |
1303 | f.put (KW_animation, (const char *) 0); |
1290 | f.put (KW_animation, (const char *)0); |
1304 | |
1291 | |
1305 | CMP_OUT2 (str, stats.Str); |
1292 | CMP_OUT2 (str, stats.Str); |
1306 | CMP_OUT2 (dex, stats.Dex); |
1293 | CMP_OUT2 (dex, stats.Dex); |
1307 | CMP_OUT2 (con, stats.Con); |
1294 | CMP_OUT2 (con, stats.Con); |
1308 | CMP_OUT2 (wis, stats.Wis); |
1295 | CMP_OUT2 (wis, stats.Wis); |