From 6fc36efaa39c45911689000cfe10fd5c60aaf21b Mon Sep 17 00:00:00 2001 From: H.G. Muller Date: Fri, 12 Nov 2010 17:02:53 +0100 Subject: [PATCH] Restrict use of escape expansion Only expand escape sequences like \n and \t in telluser(error) comamnds that ask for it by preficing the messages by double backslash. Otherwise backward copatiblity is too severely broken for messages that display DOS-style filenames. --- backend.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/backend.c b/backend.c index 46a14c7..bd4bd75 100644 --- a/backend.c +++ b/backend.c @@ -7488,13 +7488,15 @@ if(appData.debugMode) fprintf(debugFP, "nodes = %d, %lld\n", (int) programStats. * Look for communication commands */ if (!strncmp(message, "telluser ", 9)) { - EscapeExpand(message+9, message+9); // [HGM] esc: allow escape sequences in popup box + if(message[9] == '\\' && message[10] == '\\') + EscapeExpand(message+9, message+11); // [HGM] esc: allow escape sequences in popup box DisplayNote(message + 9); return; } if (!strncmp(message, "tellusererror ", 14)) { cps->userError = 1; - EscapeExpand(message+14, message+14); // [HGM] esc: allow escape sequences in popup box + if(message[14] == '\\' && message[15] == '\\') + EscapeExpand(message+14, message+16); // [HGM] esc: allow escape sequences in popup box DisplayError(message + 14, 0); return; } -- 1.7.0.4