--- deliantra/server/common/loader.l 2006/05/11 19:07:40 1.3 +++ deliantra/server/common/loader.l 2006/06/26 21:46:04 1.5 @@ -335,17 +335,17 @@ char info2[256 * 3]; char *p = info; - p += snprintf (p, 256, "%s%s%s=%d", + p += snprintf (p, 256, "%d=\"%s%s%s\"", + op->count, op->name ? op->name : "(anon)", op->title ? " " : "", - op->title ? op->title : "", - op->count); + op->title ? op->title : ""); if (op->env) p += snprintf (p, 256, "(in %s)", op_debug_info_ (op->env, info2)); if (op->map) - p += snprintf (p, 256, "(%d+%d@%s)", op->x, op->y, op->map->path); + p += snprintf (p, 256, "(on %s@%d+%d)", op->map->path, op->x, op->y); return info; } @@ -645,13 +645,17 @@ ^msg{WS}$ { BEGIN( MESSAGE ); msgbuf[0]='\0'; } ^endmsg{WS}$ { BEGIN( INITIAL ); - op->msg=add_string(msgbuf); /* Just print a warning so we can be reasonably safe * about not overflowing the buffer. */ - if (strlen(op->msg) > (HUGE_BUF/2)) - LOG(llevDebug, "\n\tWarning message length > %d (max allowed=%d): %d\n>%.80s<\n", - HUGE_BUF/2, HUGE_BUF, strlen(op->msg),op->msg); + if (strlen(msgbuf) >= HUGE_BUF) + { + LOG(llevDebug, "\n\tError message length >= %d: %d\n>%.80s<\n", + HUGE_BUF, strlen(op->msg),op->msg); + op->msg = add_string ("ERROR, please report: string too long, winged.\n"); + } + else + op->msg = add_string (msgbuf); } .* {strcat(msgbuf, yytext); strcat(msgbuf,"\n"); }