i18n: Properly restart conversion when output buffer overflows.
authorBen Pfaff <blp@cs.stanford.edu>
Tue, 21 Sep 2010 05:15:38 +0000 (22:15 -0700)
committerBen Pfaff <blp@cs.stanford.edu>
Wed, 22 Sep 2010 05:11:14 +0000 (22:11 -0700)
commitd019e8a29d7963a926837d46ae3592c5731f02e3
tree072d04632b4ec570915be4dc18d8d6090d42ac00
parentfb1c27ed0cbc16d151d182dd3f2be5eb3189a045
i18n: Properly restart conversion when output buffer overflows.

The E2BIG case tries to restart the whole conversion, by reinitializing
all variables to their initial states.  However the value of 'text' might
already have been advanced somewhat if there was a previous loop for e.g.
an invalid character.  This commit fixes the problem by keeping the
original 'text' around and using a moving input pointer instead.
src/libpspp/i18n.c