Hi

Tiny fix for unix, works for me.
Will apply it in trunk, unless David wants to fix differently.

Jean-Louis

---------- Forwarded message ----------
From: <jfaucher@users.sourceforge.net>
Date: 2012/3/26
Subject: [Oorexx-svn] SF.net SVN: oorexx:[7699] sandbox/jlf/trunk/utilities/rexx/platform/unix/ rexx.cpp
To: oorexx-svn@lists.sourceforge.net


Revision: 7699
         http://oorexx.svn.sourceforge.net/oorexx/?rev=7699&view=rev
Author:   jfaucher
Date:     2012-03-25 22:27:58 +0000 (Sun, 25 Mar 2012)
Log Message:
-----------
arg()==1 when no arg : fixed by declaring an array of size 0

Modified Paths:
--------------
   sandbox/jlf/trunk/utilities/rexx/platform/unix/rexx.cpp

Modified: sandbox/jlf/trunk/utilities/rexx/platform/unix/rexx.cpp
===================================================================
--- sandbox/jlf/trunk/utilities/rexx/platform/unix/rexx.cpp     2012-03-25 20:46:25 UTC (rev 7698)
+++ sandbox/jlf/trunk/utilities/rexx/platform/unix/rexx.cpp     2012-03-25 22:27:58 UTC (rev 7699)
@@ -143,7 +143,8 @@
    else {
        RexxCreateInterpreter(&pgmInst, &pgmThrdInst, NULL);
        // configure the traditional single argument string
-        rxargs = pgmThrdInst->NewArray(1);
+        // Initial size must be zero, because in CallProgramDispatcher::run, size will be tested, not items
+        rxargs = pgmThrdInst->NewArray(0); // Will be extended if needed
        if (argCount > 0) {
            pgmThrdInst->ArrayPut(rxargs,
                                  pgmThrdInst->NewStringFromAsciiz(arg_buffer), 1);

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.


------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
Oorexx-svn mailing list
Oorexx-svn@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-svn