Changeset 1245


Ignore:
Timestamp:
Oct 27, 2006, 9:26:35 PM (17 years ago)
Author:
Jean-Yves Lamoureux
Message:
  • "Fixed" infinite loop in ANSI+UTF8 importer, probably totally wrong, but like to be bashed.
Location:
libcaca/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • libcaca/trunk/DotNet/test.cs

    r1051 r1245  
    5858          }
    5959
    60 
    6160        /* Force deletion of our instance for fun */
    6261        qq.Dispose();
  • libcaca/trunk/cucul/import.c

    r1238 r1245  
    407407        {
    408408            unsigned int bytes;
     409            /* Probably a wrong thing */
     410            if(((char const *)(buffer + i))[0] == 0)
     411            {
     412                goto end;
     413            }
    409414            ch = cucul_utf8_to_utf32((char const *)(buffer + i), &bytes);
    410415            wch = cucul_utf32_is_fullwidth(ch) ? 2 : 1;
     
    440445        cucul_set_canvas_size(cv, width, height = y);
    441446    }
    442 
     447 end:
    443448    return cv;
    444449}
Note: See TracChangeset for help on using the changeset viewer.