Hi,
Christian Magnusson:
> - if ( formatted_data[formatted_data_pointer+1] != ~data[i] ) {
>
> + if ( formatted_data[formatted_data_pointer+1] != (BYTE) ~data[i] )
> {
>
> Can't see why this should fix it, since both variables are BYTE from the
> beginning.
They don't stay that way.
This is C. C is not a high-level programming language. There is such a
thing as a "natural word size" in C, which is commonly called "int",
and to which smaller-sized integers are promoted pretty much any time
the compiler wants to.
This means that ~FOO will treat FOO as an integer (unless it's a long
int, of course).
Newer GCCs warn you about this if you set the appropriate options;
if "-Wall" doesn't complain about this, it's a gcc bug.
--
Matthias Urlichs | {M:U} IT Design @ m-u-it.de | [EMAIL PROTECTED]
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Owfs-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/owfs-developers