Skip to content

Commit 17d3502

Browse files
committed
Generator: improve exception message
resolves #42
1 parent 6ed42b4 commit 17d3502

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Spectrogram/SpectrogramGenerator.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public class SpectrogramGenerator
4747
/// <summary>
4848
/// Index of the pixel column which will be populated next. Location of vertical line for wrap-around displays.
4949
/// </summary>
50-
public int NextColumnIndex { get => (FftsProcessed + rollOffset) % Width; }
50+
public int NextColumnIndex { get => Width > 0 ? (FftsProcessed + rollOffset) % Width : 0; }
5151

5252
/// <summary>
5353
/// This value is added to displayed frequency axis tick labels

0 commit comments

Comments
 (0)