From 8917fd60694ef2a0757d6e250faea37482b34956 Mon Sep 17 00:00:00 2001 From: Vitaly Novichkov Date: Thu, 21 Jun 2018 08:58:49 +0300 Subject: Small clean-up in a custom bank loading function --- src/adlmidi_load.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/adlmidi_load.cpp b/src/adlmidi_load.cpp index d7b1e52..41f1837 100644 --- a/src/adlmidi_load.cpp +++ b/src/adlmidi_load.cpp @@ -173,9 +173,8 @@ bool MIDIplay::LoadBank(FileAndMemReader &fr) } // Read complete bank file into the memory - fr.seek(0, SEEK_END); - fsize = fr.tell(); - fr.seek(0, SEEK_SET); + fsize = fr.fileSize(); + fr.seek(0, FileAndMemReader::SET); // Allocate necessary memory block raw_file_data = (char*)malloc(fsize); if(!raw_file_data) -- cgit v1.2.3