Skip to content

Commit

Permalink
windows: fix(workaround) illegal instruction in release build
Browse files Browse the repository at this point in the history
  • Loading branch information
nillerusr committed Dec 17, 2022
1 parent af8c358 commit ff2211f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:

steps:
- uses: actions/checkout@v2
- name: Build windows-i386
- name: Build windows-amd64
run: |
git submodule init && git submodule update
./waf.bat configure -T debug -8
Expand Down
11 changes: 9 additions & 2 deletions engine/tmessage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -322,10 +322,17 @@ int ParseDirective( const char *pText )
{
if ( ParseFloats( pText, tempFloat, 4 ) )
{
for ( int i = 0; i < 4; ++i )
// that's original code, msvc2015 generates illegal instruction on amd64 architecture
/*for ( int i = 0; i < 4; ++i )
{
gMessageParms.boxcolor[ i ] = (byte)(int)tempFloat[ i ];
}
}*/

// workaround
gMessageParms.boxcolor[0] = (int)tempFloat[0];
gMessageParms.boxcolor[1] = (int)tempFloat[1];
gMessageParms.boxcolor[2] = (int)tempFloat[2];
gMessageParms.boxcolor[3] = (int)tempFloat[3];
}
}
else if ( IsToken( pText, "clearmessage" ) )
Expand Down

0 comments on commit ff2211f

Please sign in to comment.