From c40455268263723ffc4b9c84c669c6dc4a3dd873 Mon Sep 17 00:00:00 2001 From: Mark Furneaux Date: Fri, 23 May 2014 07:20:13 -0400 Subject: [PATCH] Fix random artifacting on nyanalyzer on startup memset works on bytes, not the source datatype width --- src/analyzers/nyancatanalyzer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/analyzers/nyancatanalyzer.cpp b/src/analyzers/nyancatanalyzer.cpp index 4a2ba57cc..2c018d13a 100644 --- a/src/analyzers/nyancatanalyzer.cpp +++ b/src/analyzers/nyancatanalyzer.cpp @@ -40,7 +40,7 @@ NyanCatAnalyzer::NyanCatAnalyzer(QWidget* parent) px_per_frame_(0), x_offset_(0), background_brush_(QColor(0x0f, 0x43, 0x73)) { - memset(history_, 0, arraysize(history_)); + memset(history_, 0, arraysize(history_) * sizeof(*history_)); for (int i = 0; i < kRainbowBands; ++i) { colors_[i] = QPen(QColor::fromHsv(i * 255 / kRainbowBands, 255, 255),