summaryrefslogtreecommitdiff
path: root/pango
diff options
context:
space:
mode:
authorRobert Brady <robert@suse.co.uk>2000-11-12 18:48:38 +0000
committerRobert Brady <rbrady@src.gnome.org>2000-11-12 18:48:38 +0000
commit1ff8a34d8c98aa47438515abd16f531e838d7404 (patch)
tree967589fc5558d0057dba919742bf56e4de67d504 /pango
parente5ba4e990047e83c18de6b675402ed0c6c283a9b (diff)
downloadpango-1ff8a34d8c98aa47438515abd16f531e838d7404.tar.gz
Don't corrupt the array.
2000-11-12 Robert Brady <robert@suse.co.uk> * pango/pango-indic.c (pango_shift_vowels): Don't corrupt the array.
Diffstat (limited to 'pango')
-rwxr-xr-xpango/pango-indic.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/pango/pango-indic.c b/pango/pango-indic.c
index a4e8d6bf..e20a4980 100755
--- a/pango/pango-indic.c
+++ b/pango/pango-indic.c
@@ -43,15 +43,16 @@ pango_indic_shift_vowels (PangoIndicScript *script,
{
int length = end - chars;
int i, j;
-
+
for (i = 1 ; i < length ; i++)
{
if (script->is_prefixing_vowel (chars[i]))
{
gunichar tmp = chars[i];
-
- for (j = 1; j < i; j++)
- chars[j + 1] = chars[j];
+
+ for (j = i; j > 0; j--) {
+ chars[j] = chars[j - 1];
+ }
chars[0] = tmp;
}