[svn:parrot] r47550 - branches/gsoc_nfg/src/string/encoding
darbelo at svn.parrot.org
darbelo at svn.parrot.org
Fri Jun 11 00:47:49 UTC 2010
Author: darbelo
Date: Fri Jun 11 00:47:49 2010
New Revision: 47550
URL: https://trac.parrot.org/parrot/changeset/47550
Log:
Make sure we calculate the right output by passing in the right input.
Modified:
branches/gsoc_nfg/src/string/encoding/nfg.c
Modified: branches/gsoc_nfg/src/string/encoding/nfg.c
==============================================================================
--- branches/gsoc_nfg/src/string/encoding/nfg.c Thu Jun 10 23:28:34 2010 (r47549)
+++ branches/gsoc_nfg/src/string/encoding/nfg.c Fri Jun 11 00:47:49 2010 (r47550)
@@ -218,8 +218,8 @@
index++;
}
if (graphemes)
- dest->extra = create_grapheme_table(interp, graphemes);
- dest->strlen = index + 1;
+ dest->extra = create_grapheme_table(interp, graphemes);
+ dest->strlen = index;
dest->bufused = dest->strlen * sizeof (UChar32);
}
@@ -256,7 +256,7 @@
Parrot_nfg_encoding_ptr, Parrot_unicode_charset_ptr, 0);
UChar32 *buf = (UChar32 *) to->strstart;
- nfg_encode(interp, to, 0, src, 0, len - 1, 0);
+ nfg_encode(interp, to, 0, src, 0, len, 0);
return to;
}
More information about the parrot-commits
mailing list