mirror of
https://https.git.savannah.gnu.org/git/gettext.git
synced 2026-01-26 15:39:11 +00:00
Python: Fix bug in python-brace-format.
* gettext-tools/src/format-python-brace.c (parse_directive): The name ends before ':', not before '}'.
This commit is contained in:
parent
78e9a5d2d9
commit
340f82cfab
@ -142,6 +142,7 @@ parse_directive (struct spec *spec,
|
||||
const char *format = *formatp;
|
||||
const char *const format_start = format;
|
||||
const char *name_start;
|
||||
const char *name_end;
|
||||
char c;
|
||||
|
||||
c = *++format;
|
||||
@ -245,6 +246,8 @@ parse_directive (struct spec *spec,
|
||||
break;
|
||||
}
|
||||
|
||||
name_end = format;
|
||||
|
||||
/* Here c == *format. */
|
||||
if (c == ':')
|
||||
{
|
||||
@ -352,7 +355,7 @@ parse_directive (struct spec *spec,
|
||||
if (is_toplevel)
|
||||
{
|
||||
char *name;
|
||||
size_t n = format - name_start;
|
||||
size_t n = name_end - name_start;
|
||||
|
||||
FDI_SET (name_start - 1, FMTDIR_START);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user