summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2009-10-05 15:27:07 -0700
committerSven Gothel <[email protected]>2009-10-05 15:27:07 -0700
commit983ed55be2d69de57e52a106ea8809b52730ad12 (patch)
treeffd5cd8099f26d9d5f784502e8e72c0464de4165
parentb737b3b5efa42136f5b5348e09e2e592b4fc9863 (diff)
demos.readbuffer.Main: Allow setting a boolean
-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 {