Change 14399 by pudge@pudge-mobile on 2002/01/23 21:00:29

        Don't crash on Help for long text (bug #506672)

Affected files ...

.... //depot/maint-5.6/macperl/macos/macperl/MPHelp.c#3 edit

Differences ...

==== //depot/maint-5.6/macperl/macos/macperl/MPHelp.c#3 (text) ====
Index: perl/macos/macperl/MPHelp.c
--- perl/macos/macperl/MPHelp.c.~1~     Wed Jan 23 14:15:05 2002
+++ perl/macos/macperl/MPHelp.c Wed Jan 23 14:15:05 2002
@@ -5,6 +5,9 @@
 Language       :       MPW C
 
 $Log: MPHelp.c,v $
+Revision 1.3  2002/01/23 21:56:53  pudge
+Don't crash if very long word selected for help (bug #506672)
+
 Revision 1.2  2002/01/04 03:34:45  pudge
 Modifications for universal headers 3.4
 
@@ -316,6 +319,10 @@
        } else 
                pos = 0;
                
+       // Maximum is 255 characters
+       if (pos > 255)
+               pos = 255;
+
        if (!pos) {
                MetaHelp("\pYou didn't select any text to look up.",
                                        (StringPtr) "\p", (StringPtr) "\p", 
(StringPtr) "\p");
End of Patch.

Reply via email to