Browse Source

engine: soundlib: fix slashes in Sound_GetApproxWavePlayLen, as it can be called from game DLL

pull/2/head
Alibek Omarov 1 year ago
parent
commit
64166c7d82
  1. 6
      engine/common/soundlib/snd_utils.c

6
engine/common/soundlib/snd_utils.c

@ -95,12 +95,16 @@ byte *Sound_Copy( size_t size ) @@ -95,12 +95,16 @@ byte *Sound_Copy( size_t size )
uint GAME_EXPORT Sound_GetApproxWavePlayLen( const char *filepath )
{
string name;
file_t *f;
wavehdr_t wav;
size_t filesize;
uint msecs;
f = FS_Open( filepath, "rb", false );
Q_strncpy( name, filepath, sizeof( filepath ));
COM_FixSlashes( name );
f = FS_Open( name, "rb", false );
if( !f )
return 0;

Loading…
Cancel
Save