Browse Source

* "Fixed" infinite loop in ANSI+UTF8 importer, probably totally wrong, but like to be bashed.

tags/v0.99.beta14
Jean-Yves Lamoureux jylam 18 years ago
parent
commit
f7cd9f1b27
2 changed files with 6 additions and 2 deletions
  1. +0
    -1
      DotNet/test.cs
  2. +6
    -1
      cucul/import.c

+ 0
- 1
DotNet/test.cs View File

@@ -57,7 +57,6 @@ class Test {
Console.WriteLine("Render time : {0}", kk.getDisplayTime()-startTime);
}


/* Force deletion of our instance for fun */
qq.Dispose();
}


+ 6
- 1
cucul/import.c View File

@@ -406,6 +406,11 @@ static cucul_canvas_t *import_ansi(void const *data, unsigned int size,
if(utf8)
{
unsigned int bytes;
/* Probably a wrong thing */
if(((char const *)(buffer + i))[0] == 0)
{
goto end;
}
ch = cucul_utf8_to_utf32((char const *)(buffer + i), &bytes);
wch = cucul_utf32_is_fullwidth(ch) ? 2 : 1;
skip += bytes - 1;
@@ -439,7 +444,7 @@ static cucul_canvas_t *import_ansi(void const *data, unsigned int size,
cucul_set_color(cv, CUCUL_COLOR_DEFAULT, CUCUL_COLOR_TRANSPARENT);
cucul_set_canvas_size(cv, width, height = y);
}
end:
return cv;
}



Loading…
Cancel
Save