Bug in AnsiString to const car* conversion

27 views
Skip to first unread message

Sam Oxigen

unread,
Jun 15, 2021, 2:50:46 AMJun 15
to innosetup
Please try:
var aS1, aS2, aS3: AnsiString;
      S1, S2, S3: AnsiString;

aS1 := '5.0.6';
aS1 := '5.0..6';
aS1 := '5.0.66';

on the c++ side:
int SomeMethod(const char* pCoreClrVersion){
  aS1 translated as '5.0.' !truncated
  aS2 translated as ' 5.0..6' no truncation
  aS3 translated as ' 5.0.66' no truncation

 Ordinary strings truncated from the first dot

  // do something
}

So, workaround:
aS1 := '5.0.6\';
Translated with no truncation and luckily ...\shared\Microsoft.NETCore.App\5.0.6\\coreclr.dll 
path found even with double slashes...


Reply all
Reply to author
Forward
0 new messages