From 88b55934c77087ae5f651cf87cba87b02644a490 Mon Sep 17 00:00:00 2001 From: Restioson Date: Fri, 12 May 2017 21:19:37 +0200 Subject: [PATCH] Fix castException --- .../shared/peripheral/speaker/SpeakerPeripheral.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/dan200/computercraft/shared/peripheral/speaker/SpeakerPeripheral.java b/src/main/java/dan200/computercraft/shared/peripheral/speaker/SpeakerPeripheral.java index 79c19bf60..995a326e9 100644 --- a/src/main/java/dan200/computercraft/shared/peripheral/speaker/SpeakerPeripheral.java +++ b/src/main/java/dan200/computercraft/shared/peripheral/speaker/SpeakerPeripheral.java @@ -202,7 +202,7 @@ public class SpeakerPeripheral implements IPeripheral { if (arguments.length > 2) { - if (!(arguments[1] instanceof Double)) // Arg wrong type + if (!(arguments[2] instanceof Double)) // Arg wrong type { throw new LuaException("Expected string, number (optional), number (optional)"); }