python/dist/src/Lib textwrap.py,1.32,1.33

Update of /cvsroot/python/python/dist/src/Lib In directory sc8-pr-cvs1:/tmp/cvs-serv20357 Modified Files: textwrap.py Log Message: SF bug 797650: Infinite loop in textwrap.py When the indents were set to longer than the width and long word breaking was enabled, an infinite loop would result because the inner loop did not assure that at least one character was stripped off on every pass. Index: textwrap.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/textwrap.py,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** textwrap.py 15 Jun 2003 15:37:18 -0000 1.32 --- textwrap.py 30 Aug 2003 14:43:55 -0000 1.33 *************** *** 169,173 **** is too long to fit in any line. """ ! space_left = width - cur_len # If we're allowed to break long words, then do so: put as much --- 169,173 ---- is too long to fit in any line. """ ! space_left = max(width - cur_len, 1) # If we're allowed to break long words, then do so: put as much
participants (1)
-
rhettingerīŧ users.sourceforge.net