Fixed potential overflow

Modified: example/pcm/waveform.c