mirror of
https://github.com/YGGverse/xash3d-fwgs.git
synced 2025-01-12 08:08:02 +00:00
engine: soundlib: fix slashes in Sound_GetApproxWavePlayLen, as it can be called from game DLL
This commit is contained in:
parent
0df89bddeb
commit
64166c7d82
@ -95,12 +95,16 @@ byte *Sound_Copy( size_t size )
|
|||||||
|
|
||||||
uint GAME_EXPORT Sound_GetApproxWavePlayLen( const char *filepath )
|
uint GAME_EXPORT Sound_GetApproxWavePlayLen( const char *filepath )
|
||||||
{
|
{
|
||||||
|
string name;
|
||||||
file_t *f;
|
file_t *f;
|
||||||
wavehdr_t wav;
|
wavehdr_t wav;
|
||||||
size_t filesize;
|
size_t filesize;
|
||||||
uint msecs;
|
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 )
|
if( !f )
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user