<p></p>
<p><b>@j4yk</b> commented on this pull request.</p>
<hr>
<p>In <a href="https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/485#discussion_r407103373">platforms/win32/plugins/FilePlugin/sqWin32FilePrims.c</a>:</p>
<pre style='color:#555'>> DWORD dwReallyWritten;
- WriteFile((HANDLE)(h-1), (LPVOID) ptr, count*sz, &dwReallyWritten, NULL);
- return (size_t) (dwReallyWritten / sz);
+ size_t totalToWrite = count * sz;
+ squeakFileOffsetType position;
+
+ position = sqImageFilePosition(h);
+ while (reallyWritten != totalToWrite) {
+ DWORD toWrite = (totalToWrite - reallyWritten) > (size_t) MAX_DWORD ? MAX_DWORD : totalToWrite - reallyWritten;
+ BOOL ret = WriteFile((HANDLE)(h - 1), (LPVOID)((sqInt)ptr + (sqInt) reallyWritten), toWrite, &dwReallyWritten, NULL);
+ reallyWritten += dwReallyWritten;
+
+ if (!ret | dwReallyWritten != toWrite) {
</pre>
<p>See above.</p>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/485#pullrequestreview-391795361">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AIJPEWYSLSBS2AMBET6YZLTRMDCK3ANCNFSM4MGDV3UQ">unsubscribe</a>.<img src="https://github.com/notifications/beacon/AIJPEW2SQ2JVEIVIUGCYU4LRMDCK3A5CNFSM4MGDV3U2YY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOC5NFFII.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/485#pullrequestreview-391795361",
"url": "https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/485#pullrequestreview-391795361",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>