From d4af988d8210a0d2c505d663fd7fa8f175a89d3b Mon Sep 17 00:00:00 2001 From: Shamus Hammons Date: Thu, 3 Jan 2019 19:15:45 -0600 Subject: [PATCH] Small bugfix & fix for cross-platform compilation. --- src/analysisthread.cpp | 4 ++-- src/fileio.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/analysisthread.cpp b/src/analysisthread.cpp index 138da3a..2a909ae 100644 --- a/src/analysisthread.cpp +++ b/src/analysisthread.cpp @@ -53,7 +53,7 @@ void AnalysisThread::run() for(uint32_t i=0; i<141; i+=4) { SynthesizeTrack(i); - int a = random() & 0x03; + int a = rand() & 0x03; Global::trackStatus[i] = (a == 0 ? 3 : a); emit(ShowTracks()); } @@ -65,7 +65,7 @@ void AnalysisThread::run() continue; SynthesizeTrack(i); - int a = random() & 0x03; + int a = rand() & 0x03; Global::trackStatus[i] = (a == 0 ? 3 : a); emit(ShowTracks()); } diff --git a/src/fileio.cpp b/src/fileio.cpp index c3718c3..3261c2c 100644 --- a/src/fileio.cpp +++ b/src/fileio.cpp @@ -271,8 +271,8 @@ bool WriteWOZFile(const char * filename) woz->track[i].bitCount = Uint16LE(Global::bStreamLenBits[i]); startBlock += blockLen; - if (blockCount > largestBlock) - largestBlock = blockCount; + if (blockLen > largestBlock) + largestBlock = blockLen; } woz->largestTrack = Uint16LE(largestBlock); -- 2.37.2