[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #41965] __makeinfo__ assumes unsigned char for
From: |
Mike Miller |
Subject: |
[Octave-bug-tracker] [bug #41965] __makeinfo__ assumes unsigned char for input text when it should be signed char |
Date: |
Thu, 27 Mar 2014 13:30:31 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.152 Safari/537.36 |
Update of bug #41965 (project octave):
Status: Confirmed => Patch Submitted
Assigned to: None => mtmiller
_______________________________________________________
Follow-up Comment #2:
In writing to the continuing thread on the mailing list, I just realized an
even better solution for this that is *not* a workaround, simply use fprintf
when dealing with human-readable text, both for consistency and to let the
appropriate library routine deal with the conversion.
So the diff should be
- fwrite (fid, text);
+ fprintf (fid, "%s", text);
I'll test this later and commit (away from dev box at the moment, if someone
else is interested feel free to take care of this). This seems safe enough
that it should work on the stable branch.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?41965>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/