Skip to content

Instantly share code, notes, and snippets.

@libc
Created August 29, 2009 16:39
Show Gist options
  • Save libc/177565 to your computer and use it in GitHub Desktop.
Save libc/177565 to your computer and use it in GitHub Desktop.
commit 67acceac0e56e1c78824ec595881f1337446312e
Author: Eugene Pimenov <libc@mac.com>
Date: Sat Aug 29 18:11:19 2009 +0400
Iconv: use read_pointer instead of read_int
diff --git a/lib/iconv.rb b/lib/iconv.rb
index afdb683..88342a4 100644
--- a/lib/iconv.rb
+++ b/lib/iconv.rb
@@ -119,11 +119,11 @@ class Iconv
end
def get_success(os, l2)
- os.read_string(l2.read_int - os.address)
+ os.read_string(l2.read_pointer.address - os.address)
end
def get_failed(is, ic, l1)
- (is + (l1.read_int - is.address)).read_string(ic.read_long)
+ (is + (l1.read_pointer.address - is.address)).read_string(ic.read_long)
end
private :get_success
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment