This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Ada] Fix bug on Get_Line when incomplete last line in file


It may occur in some occasions that Get_Line incorrectly sets its Last
parameter to one past the correct value. This can only occur when the
line being copied is the last line of the file, and does not contain
the newline character.

Tested on x86_64-pc-linux-gnu, committed on trunk

2016-05-02  Yannick Moy  <moy@adacore.com>

	* a-tigeli.adb (Get_Line): Fix bound for test to
	decide when to compensate for character 0 added by call to fgets.

Attachment: difs
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]