summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rwxr-xr-xsrc/demos/readbuffer/Main.java2
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 {