Skip to content

Commit d780031

Browse files
committed
fix: checking the correct flag
found when compiling git/vi.po writestr() was executed twice due to depend on the wrong flag, this could be fixed by checking 'i'. 'i' will be 0 for at least and only one time which is suitable in case.
1 parent 7b4e3d1 commit d780031

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/msgfmt.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -318,9 +318,9 @@ int process_line_callback(struct po_info* info, void* user) {
318318
l = strlen(sysdeps[i]);
319319
assert(l+1 <= d->maxlen);
320320
if(info->type == pe_msgid) {
321-
// after str, it's msgid or msgctxt
322-
if(d->milen1)
321+
if(i==0 && d->milen1)
323322
writestr(d, info);
323+
324324
// just copy, it's written down when writemsg()
325325
if(i==0) {
326326
memcpy(d->msgidbuf1, sysdeps[i], l+1);

0 commit comments

Comments
 (0)