Permalink
Browse files

Merge branch 'master' of https://github.com/polserver/polserver

* 'master' of https://github.com/polserver/polserver:
  format issues
  Fix possible crash due to a race condition on shutdown
  ugly fix...
  Removed undefined behavior when shifting left a signed char
  • Loading branch information...
turleypol committed Feb 10, 2019
2 parents 3ce313f + f8acd63 commit e96cabfe41679952539854700d7d14ca7b9bc94f
Showing with 4 additions and 2 deletions.
  1. +1 −1 pol-core/pol/module/uomod2.cpp
  2. +3 −1 pol-core/pol/polwww.cpp
@@ -1209,7 +1209,7 @@ BObjectImp* UOExecutorModule::internal_SendCompressedGumpMenu( Character* chr, O
datadlen += static_cast<u32>( addlen );
bfr->WriteFlipped<u16>( s.length() );
while ( *string ) // unicode
bfr->Write<u16>( static_cast<u16>( ( *string++ ) << 8 ) );
bfr->Write<u16>( static_cast<u16>( static_cast<u16>( *string++ ) << 8 ) );
}
msg->WriteFlipped<u32>( numlines );
if ( numlines != 0 )
@@ -887,7 +887,9 @@ void http_thread( void )
[=]() { http_func( client_socket ); } ); // copy socket into queue to keep it valid
}
}
gamestate.mime_types.clear(); // cleanup on exit
// it's not safe to access mime_types on shutdown, because gamestate is being cleaned on another
// thread...
// gamestate.mime_types.clear(); // cleanup on exit
#ifdef _WIN32
closesocket( http_socket );
#else

0 comments on commit e96cabf

Please sign in to comment.