[Freemint-list] shel_write() causing memory violation?

Miro Kropáček miro.kropacek at gmail.com
Wed Jan 11 15:27:52 MSK 2017


On 8 January 2017 at 21:03, Thorsten Otto <admin at tho-otto.de> wrote:

> Since you don't use ARGV, you might also have to set the third parameter
> to 0.


Quite surprisingly, this is what makes XaAES cry. In xa_shel.c we can find:

if (wiscr == 1 || p_tail[0] == 0x7f || (unsigned char)p_tail[0] == 0xff)
{
    // ... treat as ARGV
}

Shouldn't this be:

if (wiscr == 1 && (p_tail[0] == 0x7f || (unsigned char)p_tail[0] == 0xff))
{
    // ... treat as ARGV
}

instead? (frankly I have no clue what the 0xff is there for, if it's
because of MagiC, it lacks handling of 0xfe)

Of course, I'll correct the bug in TosWin2 code but someone more
experienced in XaAES code (Helmut ;-)) should think about a fix for XaAES,
too.

-- 
MiKRO / Mystic Bytes
http://mikro.atari.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.atariforge.org/pipermail/freemint-list/attachments/20170111/48c9e8b0/attachment.html 


More information about the Freemint-list mailing list