cmd: avoid endless loop in sound play command
authorHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Fri, 30 Dec 2022 23:49:10 +0000 (00:49 +0100)
committerHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Wed, 4 Jan 2023 12:17:42 +0000 (13:17 +0100)
commit532952f63cfa708a04aba837f68ffe321489cdef
tree7dda1011fe4e648d4353ead50321dbf41ac11340
parent582e3c9fb2337c2f49faa73ac86dde25f4d56901
cmd: avoid endless loop in sound play command

A parameter starting with a hyphen leads to an endless loop in the sound
play command.

Leave it to dectoul() to handle the hyphen. It will return 0 for a negative
number.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
cmd/sound.c