diff options
Diffstat (limited to 'src/demos/readbuffer/Main.java')
-rwxr-xr-x | src/demos/readbuffer/Main.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/demos/readbuffer/Main.java b/src/demos/readbuffer/Main.java index cbe9cfd..ea24efa 100755 --- a/src/demos/readbuffer/Main.java +++ b/src/demos/readbuffer/Main.java @@ -195,7 +195,7 @@ public class Main implements WindowListener, MouseListener, SurfaceUpdatedListen public static boolean setField(Object instance, String fieldName, Object value) { try { Field f = instance.getClass().getField(fieldName); - if(f.getType().isInstance(value)) { + if(value instanceof Boolean || f.getType().isInstance(value)) { f.set(instance, value); return true; } else { |