public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug locale/30666] New: Malfunction caused by duplicate conditional statements in "locale/programs/charmap.c"
@ 2023-07-23 16:14 kashiwagi at unimplemented dot net
  0 siblings, 0 replies; only message in thread
From: kashiwagi at unimplemented dot net @ 2023-07-23 16:14 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=30666

            Bug ID: 30666
           Summary: Malfunction caused by duplicate conditional statements
                    in "locale/programs/charmap.c"
           Product: glibc
           Version: unspecified
            Status: UNCONFIRMED
          Severity: minor
          Priority: P2
         Component: locale
          Assignee: unassigned at sourceware dot org
          Reporter: kashiwagi at unimplemented dot net
  Target Milestone: ---

Created attachment 14998
  --> https://sourceware.org/bugzilla/attachment.cgi?id=14998&action=edit
bugfix

There is a bug in the "locale/programs/charmap.c" file. The problem lies within
the following code:

if ((nowtok == tok_mb_cur_max
     && result->mb_cur_max != 0)
     || (nowtok == tok_mb_cur_max
     && result->mb_cur_max != 0))

Suggested Fix:
The conditional statement should be corrected as follows:

if ((nowtok == tok_mb_cur_max
     && result->mb_cur_max != 0)
     || (nowtok == tok_mb_cur_min
     && result->mb_cur_min != 0))

It seems that there was a duplication of the same condition, and one of the
conditions should be comparing with tok_mb_cur_min instead of tok_mb_cur_max.
This change should address the issue and ensure proper functionality.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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

only message in thread, other threads:[~2023-07-23 16:14 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-23 16:14 [Bug locale/30666] New: Malfunction caused by duplicate conditional statements in "locale/programs/charmap.c" kashiwagi at unimplemented dot net

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).