public inbox for cygwin-apps@cygwin.com
 help / color / mirror / Atom feed
* =?gb18030?B?W1BBVENIIHNldHVwXSBGaXggQ2hpbmVzZSBIZWxwIE1lc3NhZ2UgZmFsbCBpbiBkZWFkIGxvb3AgLqOocmVzZW5kOmxhc3QgZW1haWwgaGFzIHNvbWUgZm9ybWF0IGVycm9yLqOp?=
@ 2024-03-29  1:44 =?gb18030?B?1dTOsA==?=
  0 siblings, 0 replies; only message in thread
From: =?gb18030?B?1dTOsA==?= @ 2024-03-29  1:44 UTC (permalink / raw)
  To: =?gb18030?B?Y3lnd2luLWFwcHM=?=

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="gb18030", Size: 1166 bytes --]

---
 libgetopt++/include/getopt++/DefaultFormatter.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libgetopt++/include/getopt++/DefaultFormatter.h b/libgetopt++/include/getopt++/DefaultFormatter.h
index ee2397f5..43c253a5 100644
--- a/libgetopt++/include/getopt++/DefaultFormatter.h
+++ b/libgetopt++/include/getopt++/DefaultFormatter.h
@@ -64,6 +64,7 @@ class DefaultFormatter {
        {
          // TODO: consider using a line breaking strategy here.
          int pos = helpmsg.substr(0,h_len).find_last_of(" ");
+         if(!pos)break; /*In Chinese Helpmsg,may has no space,so pos ==0,and code will fall in dead loop here*/
          theStream << helpmsg.substr(0,pos)
                    << std::endl << std::string (o_len, ' ');
          helpmsg.erase (0,pos+1);
--
2.43.0

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-03-29  1:44 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-29  1:44 =?gb18030?B?W1BBVENIIHNldHVwXSBGaXggQ2hpbmVzZSBIZWxwIE1lc3NhZ2UgZmFsbCBpbiBkZWFkIGxvb3AgLqOocmVzZW5kOmxhc3QgZW1haWwgaGFzIHNvbWUgZm9ybWF0IGVycm9yLqOp?= =?gb18030?B?1dTOsA==?=

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).