From: Jack Jansen Date: Mon, 28 Sep 1998 10:37:08 +0000 (+0000) Subject: Truncate messages if they are longer than 255 characters. Note that this is X-Git-Tag: v1.5.2a2~246 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d5af7bd489480d6720359db18ed1a391a0f61216;p=python Truncate messages if they are longer than 255 characters. Note that this is not really a good solution for default input strings... --- diff --git a/Mac/Lib/EasyDialogs.py b/Mac/Lib/EasyDialogs.py index 1b3f5ba434..7e94fee1ff 100644 --- a/Mac/Lib/EasyDialogs.py +++ b/Mac/Lib/EasyDialogs.py @@ -28,6 +28,8 @@ def cr2lf(text): def lf2cr(text): if '\n' in text: text = string.join(string.split(text, '\n'), '\r') + if len(text) > 253: + text = text[:253] + '\311' return text def Message(msg, id=256):