[AD] Proposal for small change in d_edit_proc()

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


Hello,
In d_edit_proc(), d->d1 determines the maximaul number of _characters_,
not bytes. I find this quite impractical, because I use the limit to
avoid buffer overflows. So you have to allocate 6 bytes for each
character. I have written a four-line patch for d_edit_proc() which adds
the extra feature that if d->d1<0, then -d->d1 is the maximal number of
bytes. I don't think this can break anything, so do you think it's worth
including in Allegro? (It would also allow us to improve the file
selector so that you can fill all the allocated space with contents,
even if they are encoded as one byte.)
-- 
Sven Sandberg    svsa1977@xxxxxxxxxx    home.student.uu.se/svsa1977



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/