It is a fencepost error in the StringUtil.decodeBase64() method. This simple 
patch solves the
problem for the last encoded line not ending with a LF (which is the case if 
using makestring to
recreate the encoded file from a string array):

    F:\work\svn\oorexx\main\trunk>svn diff
    Index: interpreter/classes/support/StringUtil.cpp
    ===================================================================
    --- interpreter/classes/support/StringUtil.cpp  (revision 12104)
    +++ interpreter/classes/support/StringUtil.cpp  (working copy)
    @@ -1775,10 +1775,10 @@
                 if (ch == '=')
                 {
                     // if we're looking for the first digit, then the next 
character
    -                // muust also be an '='
    +                // must also be an '='
                     if (digit == 2)
                     {
    -                    if (inputLength < 2 || *source != '=')
    +                    if (inputLength == 0 || *source != '=')
                         {
                             return false;
                         }

Any objections on committing it?

---rony


On 25.08.2020 20:13, Rony G. Flatscher wrote:
>
> Have tried to attach a zip-archive (and also a version renamed to .txt as 
> Sourceforge does not
> allow files ending in "zip") in order to make the files available in an 
> unchanged format.
>
> Here a temporary Dropbbox link to that zip-archive:
> <https://www.dropbox.com/s/svdkufxld7vj81h/src_compiledEncoded.zip?dl=0>.
>
> The zip-archive (renamed to "txt" to allow it to be delivered via 
> Sourceforge) which contains
> these three files:
>
>     F:\work\svn\bsf4oorexx\trunk\bsf4oorexx\samples\JavaFX\fxml_01>unzip -v 
> src_compiledEncoded.zip
>     Archive:  src_compiledEncoded.zip
>      Length   Method    Size  Cmpr    Date    Time   CRC-32   Name
>     --------  ------  ------- ---- ---------- ----- --------  ----
>        14932  Defl:X     4311  71% 25.08.2020 16:37 e3451473  
> fxml_01_controller.rex
>        14931  Defl:X     4310  71% 25.08.2020 18:13 297511a4  
> str1.eencoded.rex
>         2264  Defl:X     1030  55% 14.08.2020 16:59 8a7c5fe7  
> src/fxml_01_controller.rex
>     --------          -------  ---                            -------
>        32127             9651  70%                            3 files
>
> On Windows 32-bit "rexx fxml_01_ controller.rex" can be run on the command 
> line, "rexx
> str1.eencoded.rex" will cause the error 3.905.
>
> The source is in "src/fxml_01_controller.rex"
>
> "str1.eencoded.rex" got created by sending the "makestring" message to the 
> string array
> representing a compiled and encoded Rexx program.
>
> ---rony
>

_______________________________________________
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel

Reply via email to