summaryrefslogtreecommitdiff
path: root/ext/dl/lib/dl/win32.rb
diff options
context:
space:
mode:
Diffstat (limited to 'ext/dl/lib/dl/win32.rb')
-rw-r--r--ext/dl/lib/dl/win32.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/dl/lib/dl/win32.rb b/ext/dl/lib/dl/win32.rb
index 92f473d392..0fed47c324 100644
--- a/ext/dl/lib/dl/win32.rb
+++ b/ext/dl/lib/dl/win32.rb
@@ -6,7 +6,7 @@ class Win32API
DLL = {}
def initialize(dllname, func, import, export = "0")
- prototype = (export + import.to_s).tr("VPpNnLlIi", "0SSI")
+ prototype = (export + import.to_s).tr("VPpNnLlIi", "0SSI").sub(/^(.)0*$/, '\1')
handle = DLL[dllname] ||= DL::Handle.new(dllname)
@sym = handle.sym(func, prototype)
end