mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2025-01-11 10:39:56 -05:00
treat numeric input to sound name as 1-indexed
This commit is contained in:
parent
7a49a3ae43
commit
3bf9238e0c
1 changed files with 1 additions and 1 deletions
|
@ -56,7 +56,7 @@ Scratch3SoundBlocks.prototype._getSoundIndex = function (soundName, util) {
|
|||
}
|
||||
if (typeof soundName === 'number') {
|
||||
var len = util.target.sprite.sounds.length;
|
||||
index = MathUtil.wrapClamp(soundName, 0, len - 1);
|
||||
index = MathUtil.wrapClamp(soundName, 1, len) - 1;
|
||||
} else {
|
||||
index = util.target.getSoundIndexByName(soundName);
|
||||
if (index === -1) {
|
||||
|
|
Loading…
Reference in a new issue