From: <sv...@op...> - 2024-03-15 20:43:23
|
Author: manx Date: Fri Mar 15 21:43:07 2024 New Revision: 20368 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=20368 Log: Merged revision(s) 20367 from branches/OpenMPT-1.30: 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.29/ (props changed) branches/OpenMPT-1.29/libopenmpt/ (props changed) branches/OpenMPT-1.29/libopenmpt/xmp-openmpt.cpp Modified: branches/OpenMPT-1.29/libopenmpt/xmp-openmpt.cpp ============================================================================== --- branches/OpenMPT-1.29/libopenmpt/xmp-openmpt.cpp Fri Mar 15 21:42:32 2024 (r20367) +++ branches/OpenMPT-1.29/libopenmpt/xmp-openmpt.cpp Fri Mar 15 21:43:07 2024 (r20368) @@ -526,10 +526,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() ); } |