Commit faafa4c8 authored by lvqcl's avatar lvqcl Committed by Erik de Castro Lopo
Browse files

Cosmetic changes in lpc_asm.nasm and utf8.c

parent 0897458f
......@@ -637,7 +637,7 @@ cident FLAC__lpc_compute_autocorrelation_asm_ia32_sse_lag_16_old
sub esp, 32
;ASSERT(lag > 0)
;ASSERT(lag <= 12)
;ASSERT(lag <= 16)
;ASSERT(lag <= data_len)
;ASSERT(data_len > 0)
......
......@@ -49,19 +49,15 @@ int utf8_encode(const char *from, char **to)
len = MultiByteToWideChar(CP_ACP, MB_PRECOMPOSED, from, -1, NULL, 0);
if(len == 0) break;
unicode = (wchar_t*) safe_malloc_mul_2op_((size_t)len, sizeof(wchar_t));
if(unicode == NULL) break;
len = MultiByteToWideChar(CP_ACP, MB_PRECOMPOSED, from, -1, unicode, len);
if(len == 0) break;
len = WideCharToMultiByte(CP_UTF8, 0, unicode, -1, NULL, 0, NULL, NULL);
if(len == 0) break;
utf8 = (char*) safe_malloc_mul_2op_((size_t)len, sizeof(char));
if(utf8 == NULL) break;
len = WideCharToMultiByte(CP_UTF8, 0, unicode, -1, utf8, len, NULL, NULL);
if(len == 0) break;
......@@ -92,19 +88,15 @@ int utf8_decode(const char *from, char **to)
len = MultiByteToWideChar(CP_UTF8, 0, from, -1, NULL, 0);
if(len == 0) break;
unicode = (wchar_t*) safe_malloc_mul_2op_((size_t)len, sizeof(wchar_t));
if(unicode == NULL) break;
len = MultiByteToWideChar(CP_UTF8, 0, from, -1, unicode, len);
if(len == 0) break;
len = WideCharToMultiByte(CP_ACP, WC_COMPOSITECHECK, unicode, -1, NULL, 0, NULL, NULL);
if(len == 0) break;
acp = (char*) safe_malloc_mul_2op_((size_t)len, sizeof(char));
if(acp == NULL) break;
len = WideCharToMultiByte(CP_ACP, WC_COMPOSITECHECK, unicode, -1, acp, len, NULL, NULL);
if(len == 0) break;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment