Assign (static) array of widechar to openstring causes exception
Original Reporter info from Mantis: marco @marcoonthegit
-
Reporter name: Marco van de Voort
Original Reporter info from Mantis: marco @marcoonthegit
- Reporter name: Marco van de Voort
Description:
Found this issue when changing RTL parts to unicode. Luckily ninl:3034 hints on openstring, so that made it easier to isolate.
A workaround is assigning to a shortstring first.
Steps to reproduce:
See attached program
{$mode objfpc}
procedure xx(var s:shortstring);
var dirbuf:array[0..1321] of widechar;
begin
s:=dirbuf;
end;
Additional information:
$000000010006C011 line 434 of symsym.pas
$000000010009C6AD line 436 of nutils.pas
$00000001001043F4 line 3034 of ninl.pas
$000000010005ADA4 line 80 of pass_1.pas
$000000010005AE99 line 116 of pass_1.pas
$00000001000E7C64 line 2129 of ncnv.pas
$000000010005ADA4 line 80 of pass_1.pas
$000000010005AE99 line 116 of pass_1.pas
$00000001000ABB70 line 722 of ncal.pas
$00000001000AC95C line 1005 of ncal.pas
$00000001000AC95C line 1005 of ncal.pas
$00000001000AC95C line 1005 of ncal.pas
$00000001000B2F9C line 3222 of ncal.pas
$000000010005ADA4 line 80 of pass_1.pas
$000000010005AE99 line 116 of pass_1.pas
$00000001000B5BEF line 566 of nbas.pas
$000000010005ADA4 line 80 of pass_1.pas
Mantis conversion info:
- Mantis ID: 24410
- OS: Win64
- Platform: x86_64
- Version: 2.7.1
- Fixed in version: 3.0.0