From 1525f46817af8c43c8e7608b9312c4ee13ecc01d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jan=20Tr=C3=A1vn=C3=AD=C4=8Dek?= <jan.travnicek@fit.cvut.cz>
Date: Thu, 25 Nov 2021 15:42:19 +0100
Subject: [PATCH] std: fix implicit narrowing conversion

---
 alib2std/src/extensions/istream.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/alib2std/src/extensions/istream.cpp b/alib2std/src/extensions/istream.cpp
index b447983c51..3cd10bb735 100644
--- a/alib2std/src/extensions/istream.cpp
+++ b/alib2std/src/extensions/istream.cpp
@@ -6,7 +6,7 @@ ext::istream & oprr ( ext::istream & in, const std::string & str, bool start ) {
 	if ( str.empty ( ) ) return in;
 
 	char c_str = str[0];
-	char c_in  = in.peek ( );
+	int c_in  = in.peek ( );
 	in.get ( );
 
 	if ( c_in == EOF ) {
@@ -25,7 +25,7 @@ ext::istream & oprr ( ext::istream & in, const std::string & str, bool start ) {
 
 	if ( in.fail ( ) ) {
 		in.clear ( );
-		in.putback ( c_in );
+		in.putback ( static_cast < char > ( c_in ) );
 		in.clear ( std::ios::failbit );
 	}
 
-- 
GitLab