Results 1 to 10 of 34

Thread: BeRoPNG - A very tiny but complete PNG loader

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #16
    Forgot about this thread... but:

    function Swap32(x:word):word;

    word is 16 bit unsigned... can only contain 0..$FFFF -- therein:

    x and $ffff returns X

    x and $ffff0000 returns 0, always...

    since $FFFF is the highest number WORD can contain, $0000FFFF and $FFFF0000 == 0, ALWAYS. X in your function CANNOT hold a value that would return anything but zero on that second AND.... EVER.

    See what I'm saying? for that function to work X would have to be DWORD and/or Longint... 32 bit... not 16 bit which is what WORD is.
    Last edited by deathshadow; 25-09-2011 at 12:05 PM.
    The accessibility of a website from time to time must be refreshed with the blood of designers and owners. It is its natural manure

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •