This commit looks a lot bigger than it really is, I noticed a couple spots where with these issues so I ran a regex to find all possible occurrences and switched all that could be, after manually ensuring it was actually correct
Using sizeof on the buffer (as long as the buffer is a char *array*, not a pointer!!) greatly reduces the chance of something having the wrong size because of a later change to the buffer, notably a couple snprintfs were missed in the UTF_BUFFER_BYTESIZE change
- GCC warned of a case when the size specified in a snprintf call was
larger than the size of a target buffer. To fix, when possible use
sizeof() to match buffer size.
Makes it more clear why all of the buffers are being multiplied by 4
Fix UTF-8 bytesize macro
Before UTF_BUFFER_BYTESIZE(str_width - 10)] would multiply the 10, not the whole number, by UTF_MAX_BYTES_PER_RUNE
Do (rune_count + 1) * 4 in UTF-8 bytesize macro
Fix Resize/Truncate String snprintf size
Before it would break if the last character was multi-byte
Fix height of ラ character
I accidentally made it 1px too tall before
Add Cyrillic to default font
Make Я more like latin R
Right after I commit, looking at my screenshot I notice I forgot to tweak the Я to be more angled like this font's latin R...
Improve the default font's Kana
derp fix
Properly handle invalid UTF-8
Fix conversion PBMs with non-byte aligned rows
Rename font extension to .frf
For Font RiFf
Re-add PBM font support
Default converting to CP-437 and try guess size
Revert "Default converting to CP-437 and try guess size"
Reverts 2c9a47d224b28cbb51a3ee335fd9970265201b72 as I think the old behaviour works better given PBM font support being kept
Re-add mapping file for CP-437
Automatically use mapping file with same name as image
ex. for "font_6x10.pbm" it will use "font_6x10.txt" in the same directory
* Fixed inability to install a larger ticket when a smaller one is installed
* improved AddBDRIEntry checks, formatting and added define for REPLACE_SIZE_MISMATCH
It adds a new chip type, that works like regular 3DS saves. It
presumably is manufactured by Macronix as well.
Thank you for your help, @FerozElMejor on Discord and @Epicpkmn11
Fixes#703 and is only active with `make LARGEDLC=1` and will break compatibility with other titles and CIAs. Thanks @luigoalma for new ticket builder code!
Since in all cases that LoadCertFromCertDb is called
is always twice, one for sysnand and another for emunand
just make it a single call and quit early when cert found.