Go Back   Cockos Incorporated Forums > REAPER Forums > REAPER Bug Reports

Reply
 
Thread Tools Display Modes
Old 10-02-2023, 05:56 AM   #1
jack461
Human being with feelings
 
jack461's Avatar
 
Join Date: Nov 2013
Location: France
Posts: 181
Default [JSFX] sprintf() messing with its arguments

[[REAPER v6.82 - Mac OS Ventura 13.3 on Mac Studio]]
This simple code gives incorrect results. After:
Code:
function xed(str, val)
(
    sprintf(str, "%d", val);
    str;
);

sprintf(#res1, "Ex-1:  %s  %s", xed(#A1, 345), xed(#A2, 678));

xed(#A3, 345);
xed(#A4, 678);

sprintf(#res2, "Ex-2:  %s  %s", #A3, #A4);
String #res1 is "Ex-1: 678 678" (incorrect) while #res2 is "Ex-2: 345 678" (correct).
jack461 is offline   Reply With Quote
Old 10-08-2023, 10:48 AM   #2
Justin
Administrator
 
Justin's Avatar
 
Join Date: Jan 2005
Location: NYC
Posts: 15,704
Default

thanks! from what I can tell this only affects the arm64 version of EEL2/JSFX, fixing!
Justin is offline   Reply With Quote
Old 10-08-2023, 11:48 PM   #3
Tale
Human being with feelings
 
Tale's Avatar
 
Join Date: Jul 2008
Location: The Netherlands
Posts: 3,644
Default

FWIW, fix confirmed (on Apple M1).
Tale is offline   Reply With Quote
Old 10-09-2023, 06:14 AM   #4
Justin
Administrator
 
Justin's Avatar
 
Join Date: Jan 2005
Location: NYC
Posts: 15,704
Default

(narrator: it also affected arm32 and a hypothetical PPC build)
Justin is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 11:28 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.