fix: invalid data access of data field

bgl_babylon.cc

fix #770
This commit is contained in:
YiFang Xiao 2023-06-03 09:36:18 +08:00 committed by xiaoyifang
parent 0c7d7ada21
commit 1391a8fa7e

View file

@ -382,8 +382,9 @@ bgl_entry Babylon::readEntry( ResourceHandler * resourceHandler )
len = qFromBigEndian( *reinterpret_cast< quint32 * >( block.data + pos ) ); len = qFromBigEndian( *reinterpret_cast< quint32 * >( block.data + pos ) );
pos += 4; pos += 4;
} }
else else {
{ if ( pos + 1 > block.length )
break;
len = (unsigned char)block.data[ pos++ ]; len = (unsigned char)block.data[ pos++ ];
} }