Small ARexx bug

A forum for general AmigaOS 4.x support questions that are not platform-specific
Post Reply
User avatar
polluks
Posts: 24
Joined: Tue May 19, 2015 6:30 pm
Location: Germany
Contact:

Small ARexx bug

Post by polluks »

Hi!
The third argument should prompt an error message

Code: Select all

rx "say word(foo,1,bar)"
Here comes a quick patch, just one byte will be changed

Code: Select all

0000: 464F524D 00000088 50544348 56455253 FORM....PTCHVERS
0010: 00000024 00000300 53415320 496E7374 ...$....SAS Inst
0020: 69747574 652C2049 6E632E20 50617463 itute, Inc. Patc
0030: 68205636 2E353000 494E5046 0000001C h V6.50.INPF....
0040: 002866C2 00008AD8 3A726578 78737973 .(f?...?:rexxsys
0050: 6C69622E 6C696272 61727900 4F555446 lib.library.OUTF
0060: 0000001A 002866B2 00008AD8 72657878 .....(f?...?rexx
0070: 7379736C 69622E6C 69627261 72795053 syslib.libraryPS
0080: 45510000 000A5571 9DA05519 3A000000 EQ....Uq.?U.:...
Have a nice day!

User avatar
broadblues
AmigaOS Core Developer
AmigaOS Core Developer
Posts: 591
Joined: Sat Jun 18, 2011 2:40 am
Location: Portsmouth, UK
Contact:

Re: Small ARexx bug

Post by broadblues »


9.AmigaOS4:> rx "say word(foo.1.bar)"
+++ Error 17 in line 1: Wrong number of arguments
Command returned 10/17: Wrong number of arguments

9.AmigaOS4:> version rexxsyslib.library full
rexxsyslib.library 53.4 (21/02/2013)
9.AmigaOS4:> version rx full
rx 52.1 (09/12/2006)
Seems to give an error message here.

What version are you using?

User avatar
polluks
Posts: 24
Joined: Tue May 19, 2015 6:30 pm
Location: Germany
Contact:

Re: Small ARexx bug

Post by polluks »

Of course you don't use a comma, this is a single argument.
I have the same version.

User avatar
nbache
Beta Tester
Beta Tester
Posts: 1439
Joined: Mon Dec 20, 2010 7:25 pm
Location: Copenhagen, Denmark
Contact:

Re: Small ARexx bug

Post by nbache »

I can confirm your observation:

Code: Select all

$ rx "say word(foo, 1, bar)"
FOO
$ version rexxsyslib.library full
rexxsyslib.library 53.4 (21/02-2013)
But a patch of the binary isn't going to help get the issue solved in future versions.

Since you have been clever enough to work out how to patch it, you might explain what your patch achieves in a manner which makes it easy for an OS developer to change the source code accordingly.

I'm guessing you may have found something looking like a table defining the arity of the functions?

Best regards,

Niels

User avatar
polluks
Posts: 24
Joined: Tue May 19, 2015 6:30 pm
Location: Germany
Contact:

Re: Small ARexx bug

Post by polluks »

I see, the byte after the string "WORD" has to be $22 not $32 (exactly two arguments).

Bye!

User avatar
nbache
Beta Tester
Beta Tester
Posts: 1439
Joined: Mon Dec 20, 2010 7:25 pm
Location: Copenhagen, Denmark
Contact:

Re: Small ARexx bug

Post by nbache »

Yep, that's what I thought.

I'll make a BZ about it. Edit: Done.

Best regards,

Niels

Post Reply