From cb8f0417a7e8587932ac12eeb8c29b5c4b3bdf7e Mon Sep 17 00:00:00 2001 From: Lynix Date: Wed, 18 Apr 2018 20:14:56 +0200 Subject: [PATCH] Core/Stream: Fix ReadLine behavior towards empty lines --- ChangeLog.md | 1 + src/Nazara/Core/Stream.cpp | 5 +---- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/ChangeLog.md b/ChangeLog.md index 92b2acd6a..4dfee067f 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -90,6 +90,7 @@ Nazara Engine: - Fixed Font handling of whitespace glyphs (which were triggering an error) - ⚠️ Translucent2D pipeline no longer has depth sorting - Fixed SimpleTextDrawer line bounds +- ⚠️ Stream::ReadLine will now returns empty lines if present in the file Nazara Development Kit: - Added ImageWidget (#139) diff --git a/src/Nazara/Core/Stream.cpp b/src/Nazara/Core/Stream.cpp index afc213814..31c42bd84 100644 --- a/src/Nazara/Core/Stream.cpp +++ b/src/Nazara/Core/Stream.cpp @@ -52,7 +52,7 @@ namespace Nz * * \param lineSize Maximum number of characters to read, or zero for no limit * - * \return Line containing characters + * \return Line read from file * * \remark With the text stream option, "\r\n" is treated as "\n" * \remark The line separator character is not returned as part of the string @@ -86,9 +86,6 @@ namespace Nz if (!SetCursorPos(GetCursorPos() - readSize + pos + 1)) NazaraWarning("Failed to reset cursor pos"); - - if (!line.IsEmpty()) - break; } else {