Skip to content
master
Switch branches/tags
Go to file
Code

Latest commit

Natural/Integer<T>.bit() (BitRange) was shifting by whatever type the source was to match the target bit length.
But this breaks when the target type is u64/s64 and the source type is u32/s32 or smaller. Shifting by >=32 becomes undefined behavior.
We have to cast the input source to the target type first, so that the source<<shift result is valid.
This is safe here regardless of source's signedness, because it's only used in =, &=, ^=, |= operations.
9febc7d

Git stats

Files

Permalink
Failed to load latest commit information.

higan

higan logo

higan is a multi-system emulator, originally developed by Near, with an uncompromising focus on accuracy and code readability.

It currently emulates the following systems: Famicom, Famicom Disk System, Super Famicom, Super Game Boy, Game Boy, Game Boy Color, Game Boy Advance, Game Boy Player, SG-1000, SC-3000, Master System, Game Gear, Mega Drive, Mega CD, PC Engine, SuperGrafx, MSX, MSX2, ColecoVision, Neo Geo Pocket, Neo Geo Pocket Color, WonderSwan, WonderSwan Color, SwanCrystal, Pocket Challenge V2.

Links

Official Releases

Official releases are available from the GitHub releases page.

Nightly Builds

Automated, untested builds of higan are available for each supported operating system:

Windows higan
Linux higan
macOS higan
FreeBSD higan

Preview

higan user interface higan running Bahamut Lagoon (SNES) higan running Golden Sun (GBA)

About

higan is a multi-system emulator focused on accuracy, preservation, and configurability.

Topics

Resources

License

Packages

No packages published

Languages