From d880d46214311f15536105116261ec01459b1f8c Mon Sep 17 00:00:00 2001 From: Alek Mosingiewicz Date: Tue, 22 May 2018 16:23:22 +0200 Subject: [PATCH] Type cast fix. --- include/chaiscript/language/chaiscript_parser.hpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/include/chaiscript/language/chaiscript_parser.hpp b/include/chaiscript/language/chaiscript_parser.hpp index 48961250..cc296454 100644 --- a/include/chaiscript/language/chaiscript_parser.hpp +++ b/include/chaiscript/language/chaiscript_parser.hpp @@ -525,7 +525,7 @@ namespace chaiscript bool retval = false; while (m_position.has_more()) { - if(static_cast(*m_position) > 0x7e) { + if(static_cast(*m_position) > 0x7e) { throw exception::eval_error("Illegal character", File_Position(m_position.line, m_position.col), *m_filename); } auto end_line = (*m_position != 0) && ((*m_position == '\n') || (*m_position == '\r' && *(m_position+1) == '\n')); @@ -2599,10 +2599,6 @@ namespace chaiscript m_position = Position(t_input.begin(), t_input.end()); m_filename = std::make_shared(std::move(t_fname)); - //if (detail::Char_Parser_Helper::has_utf8_bom(t_input)) { - // throw exception::eval_error("UTF-8 in user provided input!"); - //} - if ((t_input.size() > 1) && (t_input[0] == '#') && (t_input[1] == '!')) { while (m_position.has_more() && (!Eol())) { ++m_position;