Skip to content

Commit

Permalink
duck_streams.clj: use correct array size, Fixes #16
Browse files Browse the repository at this point in the history
  • Loading branch information
Stuart Sierra committed Aug 17, 2009
1 parent 74f64cd commit 386168c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/clojure/contrib/duck_streams.clj
Expand Up @@ -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))))))))

Expand Down

0 comments on commit 386168c

Please sign in to comment.