From 044a03dc347276ada7f4b14a02a5ce6293d887f0 Mon Sep 17 00:00:00 2001 From: Doug Coleman Date: Fri, 7 Oct 2011 15:04:00 -0700 Subject: [PATCH] On Windows, the overlapped structure high bits were always zero, so reading through a file > 4gb would loop forever. --- basis/io/files/windows/windows.factor | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/basis/io/files/windows/windows.factor b/basis/io/files/windows/windows.factor index cda77915cc..bd924989a9 100755 --- a/basis/io/files/windows/windows.factor +++ b/basis/io/files/windows/windows.factor @@ -68,7 +68,10 @@ C: io-callback : make-overlapped ( port -- overlapped-ext ) [ (make-overlapped) ] dip - handle>> ptr>> [ >>offset ] when* ; + handle>> ptr>> [ + [ 32 bits >>offset ] + [ -32 shift >>offset-high ] bi + ] when* ; M: windows FileArgs-overlapped ( port -- overlapped ) make-overlapped ;