aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorStuart Sierra <mail@stuartsierra.com>2009-08-17 16:41:24 -0400
committerStuart Sierra <mail@stuartsierra.com>2009-08-17 16:41:24 -0400
commit386168c1b3c64f3402dbf7068f6626b55ac825ec (patch)
tree0afad708d382a75883bb28e54d7b308ac5e0f9ba /src
parent74f64cdea1debc7e2442f9337f28a25a769792d2 (diff)
duck_streams.clj: use correct array size, Fixes #16
Diffstat (limited to 'src')
-rw-r--r--src/clojure/contrib/duck_streams.clj2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/clojure/contrib/duck_streams.clj b/src/clojure/contrib/duck_streams.clj
index 35af8ad7..f15e0ee4 100644
--- a/src/clojure/contrib/duck_streams.clj
+++ b/src/clojure/contrib/duck_streams.clj
@@ -316,7 +316,7 @@
(loop []
(let [size (.read input buffer)]
(when (pos? size)
- (let [chars (.toCharArray (String. buffer *default-encoding*))]
+ (let [chars (.toCharArray (String. buffer 0 size *default-encoding*))]
(do (.write output chars)
(recur))))))))