Fix a crash in the FifoPlayer dialog.

This commit is contained in:
NeoBrainX 2013-02-09 12:38:20 +01:00
parent a11827cdf0
commit 6645bd6fc6
1 changed files with 3 additions and 1 deletions

View File

@ -624,7 +624,9 @@ void FifoPlayerDlg::OnObjectListSelectionChanged(wxCommandEvent& event)
int stream_size = Common::swap16(objectdata);
objectdata += 2;
wxString newLabel = wxString::Format(wxT("%08X: %02X %04X "), obj_offset, cmd, stream_size);
if ((objectdata_end - objectdata) % stream_size) newLabel += _("NOTE: Stream size doesn't match actual data length\n");
if (stream_size && ((objectdata_end - objectdata) % stream_size))
newLabel += _("NOTE: Stream size doesn't match actual data length\n");
while (objectdata < objectdata_end)
{
newLabel += wxString::Format(wxT("%02X"), *objectdata++);