Skip to content

Commit d8b80c3

Browse files
authoredSep 10, 2017
Changed to static cast for input line read for gnu version 11. Thanks to Chirag Khurana for spotting the error.
1 parent 7410179 commit d8b80c3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎src/Core.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ void Core::load_program_memory(){
5050
stringstream line(temp);
5151
unsigned int address;
5252
unsigned int inst;
53-
bool isReadAddr = (line>>hex>>address);
54-
bool isReadInst = (line>>hex>>inst);
53+
bool isReadAddr = static_cast<bool>(line>>hex>>address);
54+
bool isReadInst = static_cast<bool>(line>>hex>>inst);
5555

5656
if (isReadAddr && isReadInst) {
5757
if (address >= 0 && address <= MEM_CAPACITY - sizeof(unsigned int)){

0 commit comments

Comments
 (0)
Please sign in to comment.