From: <sv...@op...> - 2024-03-15 20:42:48
|
Author: manx Date: Fri Mar 15 21:42:32 2024 New Revision: 20367 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=20367 Log: Merged revision(s) 20366 from branches/OpenMPT-1.31/libopenmpt/xmp-openmpt: Merged revision(s) 20365 from trunk/OpenMPT: [Fix] xmp-openmpt: Fix xmplay_streambuf::underflow(). When returning eof, we also need to set the get area to empty according to the standard. ........ ........ Modified: branches/OpenMPT-1.30/libopenmpt/ (props changed) branches/OpenMPT-1.30/libopenmpt/xmp-openmpt.cpp (contents, props changed) Modified: branches/OpenMPT-1.30/libopenmpt/xmp-openmpt.cpp ============================================================================== --- branches/OpenMPT-1.30/libopenmpt/xmp-openmpt.cpp Fri Mar 15 21:41:11 2024 (r20366) +++ branches/OpenMPT-1.30/libopenmpt/xmp-openmpt.cpp Fri Mar 15 21:42:32 2024 (r20367) @@ -585,10 +585,10 @@ start += put_back_count; } std::size_t n = xmpffile->Read( file, start, buffer.size() - ( start - base ) ); + setg( base, start, start + n ); if ( n == 0 ) { return traits_type::eof(); } - setg( base, start, start + n ); return traits_type::to_int_type( *gptr() ); } |