<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Thanks Dave!<br>
<br>
Cheers,<br>
<br>
On 3/18/2024 5:02 PM, lewis--- via Cuis-dev wrote:
<blockquote
cite="mid:beb67d1dc574e52626a2b90541493865@mail.msen.com"
type="cite">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<p>Thanks Juan, I made the updates to the Smalltalk source
(VMMaker and VMMaker.oscog packages) and pushed the generated C
code to the github and SVN repositories.</p>
<p>CC to the vm-dev list for info.</p>
<p>Dave</p>
<p><br>
</p>
<p id="reply-intro">On 2024-03-18 18:16, Juan Vuletich via
Cuis-dev wrote:</p>
<blockquote type="cite" style="padding: 0pt 0.4em; border-left:
2px solid rgb(16, 16, 255); margin: 0pt;">
<div id="replybody1">
<div>Hi Dave,<br>
<br>
On 3/18/2024 12:35 PM, lewis--- via Cuis-dev wrote:
<blockquote type="cite" style="padding: 0pt 0.4em;
border-left: 2px solid rgb(16, 16, 255); margin: 0pt;">
<p> Hi Juan,</p>
<p id="v1reply-intro">On 2024-03-17 18:17, Juan Vuletich
via Cuis-dev wrote:</p>
<blockquote style="padding: 0pt 0.4em; border-left: 2px
solid rgb(16, 16, 255); margin: 0pt;">
<div id="v1replybody1">
<div>Hi Dave,<br>
<br>
On 3/16/2024 6:22 PM, lewis--- via Cuis-dev wrote:As
I said in a separate email, Vanessa found the origin
of the problem, and the fix is now at GitHub.<br>
<br>
Still, as you say, the primitive fails, both in Cuis
and Squeak, but only the first time it is called.
The lines are read in reverse order, so the line
that is first copied is actually the last one.<br>
<br>
In #read24BmpLine:into:startingAt:width:, at the
start of the fallback code, I added this line:
`{formBitsIndex+width. formBits size} print.`. Then
tried to load Hilaire's BMP. In the Transcript I got
#(63601 63600). So, in BMPReadWriterPlugin.c, the
lines that read:<br>
<br>
if (!(((formBitsIndex + width) <=
formBitsSize)<br>
&& ((width * 3) <=
pixelLineSize))) {<br>
return primitiveFail();<br>
<br>
should actually read<br>
<br>
if (!(((formBitsIndex + width - 1) <=
formBitsSize)<br>
&& ((width * 3) <=
pixelLineSize))) {<br>
return primitiveFail();<br>
<br>
and the primitive will not fail.<br>
<br>
It is a minor bug, with no practical consequences,
so this is not really important. But I found this
while investigating the BMP read failure, and I
thought it was worth commenting.<br>
<br>
Thanks,</div>
</div>
</blockquote>
<p><br>
</p>
<p>The expression appears in both
BMPReadWriterPlugin>>primitiveRead24BmpLine and
BMPReadWriterPlugin>>primitiveWrite24BmpLine. Can
you please confirm my assumption that the same fix
should be applied to both methods? Sorry if this is
obvious but I just want to be sure.</p>
<p>Thanks!</p>
<p>Dave</p>
</blockquote>
<br>
Yep. Checking the code in both methods it is pretty clear
that they are analogous. In any case, I did some quick
testing, and in both cases the primitive fails exactly once
and for the same value of the parameters. The tweak should
be same in both cases.<br>
<br>
Thanks!<br>
<pre class="v1moz-signature">--
Juan Vuletich
cuis.st
github.com/jvuletich
researchgate.net/profile/Juan-Vuletich
independent.academia.edu/JuanVuletich
patents.justia.com/inventor/juan-manuel-vuletich
linkedin.com/in/juan-vuletich-75611b3
twitter.com/JuanVuletich</pre>
</div>
</div>
<br>
<div class="pre" style="margin: 0pt; padding: 0pt; font-family:
monospace;"> </div>
</blockquote>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
Juan Vuletich
cuis.st
github.com/jvuletich
researchgate.net/profile/Juan-Vuletich
independent.academia.edu/JuanVuletich
patents.justia.com/inventor/juan-manuel-vuletich
linkedin.com/in/juan-vuletich-75611b3
twitter.com/JuanVuletich</pre>
</body>
</html>