}
assert(ret ? tmp_len == ret_len : 1);
- assert(ret ? wcslen(ret) == ret_len - 1 : 1);
+ assert(ret && !in_len ? wcslen(ret) == ret_len - 1 : 1);
ret[ret_len-1] = L'\0';
{/*{{{*/
wchar_t *ret = NULL;
const char *idx = in, *end;
-
+#if PHP_DEBUG
+ size_t save_in_len = in_len;
+#endif
+
assert(in && in_len ? in[in_len] == '\0' : 1);
if (!in) {
} while (i < in_len);
ret[in_len] = L'\0';
- assert(ret ? wcslen(ret) == in_len : 1);
+ assert(ret && !save_in_len ? wcslen(ret) == in_len : 1);
if (PHP_WIN32_CP_IGNORE_LEN_P != out_len) {
*out_len = in_len;
}
assert(target ? r == target_len : 1);
- assert(target ? strlen(target) == target_len - 1 : 1);
+ assert(target && !in_len ? strlen(target) == target_len - 1 : 1);
target[target_len-1] = '\0';