On Mon, Aug 18, 2025 at 07:23:38PM +0200, Otto Moerbeek wrote:
> On Mon, Aug 18, 2025 at 06:40:04PM +0200, Walter Alejandro Iglesias wrote:
> > const wchar_t p[] = { period, question, exclam, ellipsis };
> 
> This is not a string, as is is not NUL terminated, so there's garbage
> after it, which will be picked up by wcsspn() until it hits a NUL.
> 
> Declaring it as const wchar_t p[5] = { period, question, exclam, ellipsis } 
> 
> and/or initing it as { period, question, exclam, ellipsis, '\0' }
> 
> should work.

That's right,

Thank you very much!

> 
>       -Otto
> 
> 

-- 
Walter

Reply via email to