Permalink
Browse files

fix GETSOCKOPT when the option is a string

  • Loading branch information...
1 parent cd42a5a commit 4fb69b35f4496d98ecc98e92548244a690df6d9c @galdor galdor committed Oct 5, 2011
Showing with 3 additions and 2 deletions.
  1. +3 −2 src/zeromq.lisp
View
@@ -168,8 +168,9 @@ context CONTEXT with type TYPE."
(call-ffi -1 '%getsockopt socket option %value %size)
(case option
(:identity
- (when (> (mem-ref %size 'size-t) 0)
- (foreign-string-to-lisp %value)))
+ (let ((size (mem-ref %size 'size-t)))
+ (when (> size 0)
+ (foreign-string-to-lisp %value :count size))))
(:events
(foreign-bitfield-symbols 'event-types (mem-ref %value type)))
(t

0 comments on commit 4fb69b3

Please sign in to comment.