Changeset ace9ee7 in buchla-68k for lib700


Ignore:
Timestamp:
07/14/2017 05:10:50 PM (7 years ago)
Author:
Thomas Lopatic <thomas@…>
Branches:
master
Children:
d6f9ed1
Parents:
fa38804
Message:

Fix shift count overflow.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib700/micons.c

    rfa38804 race9ee7  
    4747int16_t miconi(int16_t wi)
    4848{
    49         if (sizeof (int16_t) == 4)
    50                 return( ((wi << 24) & 0xFF000000L) | ((wi << 8) & 0x00FF0000L) |
    51                         ((wi >> 8) & 0x0000FF00L) | ((wi >> 24) & 0x000000FFL) );
    52         else
    53                 return(((wi << 8) & 0xFF00) | ((wi >> 8) & 0x00FF));
     49        return(((wi << 8) & 0xFF00) | ((wi >> 8) & 0x00FF));
    5450}
    5551
Note: See TracChangeset for help on using the changeset viewer.