# typo in zend_API.h (add_index_ascii_string)

- Thread: https://externals.io/message/26635
- Original archive: https://news-web.php.net/php.internals/26635
- Started by Michael Wallner on 2006-11-15T22:41:26+00:00
- Messages: 2
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #26635 — Michael Wallner — 2006-11-15T22:41:26+00:00

URL: https://externals.io/message/26635#26635

There, length should be assigned to ___u_len.

Regards,
-- 
Michael

---

## #26637 — Antony Dovgal — 2006-11-15T22:50:43+00:00

URL: https://externals.io/message/26635#26637 · In reply to: #26635

Fixed, thanks.


> There, length should be assigned to ___u_len.
> 
> Regards,
> 
> 
> ------------------------------------------------------------------------
> 
> Index: Zend/zend_API.h
> ===================================================================
> RCS file: /repository/ZendEngine2/zend_API.h,v
> retrieving revision 1.268
> diff -u -p -d -r1.268 zend_API.h
> --- Zend/zend_API.h	27 Oct 2006 21:22:05 -0000	1.268
> +++ Zend/zend_API.h	15 Nov 2006 22:38:21 -0000
> @@ -1252,7 +1252,7 @@ ZEND_API int add_index_zval(zval *arg, u
>  
>  #define add_index_ascii_stringl(arg, idx, str, length, flags) do { \
>  		if (UG(unicode)) { \
> -			int ___u_len; \
> +			int ___u_len = length; \
>  			UChar *___u_str = zend_ascii_to_unicode((str), (___u_len)+1 ZEND_FILE_LINE_CC); \
>  			if ((flags) & ZSTR_AUTOFREE) { \
>  				efree(str); \
> 
> 


-- 
Wbr, 
Antony Dovgal
