Rangi
96bc58b7f7
Add test case for local labels that superficially look like keywords
2026-07-11 13:51:53 -04:00
Rangi
4857ad1e00
Fix crash on image without any colors (all transparent)
2026-07-11 13:18:40 -04:00
Rangi
3b33c942ae
Fix a crash and a limitation in RGBGFX unoptimized output
...
- If both banks 0 and 1 were completely filled, then
`assume(bank == 0)` would false and potentially crash.
- If the input image had fully-background tiles, they would be
incorrectly counted towards `nbTiles` and could cause the
"Image contains N tiles, exceeding the limit" check to fail.
2026-07-11 12:32:31 -04:00
Rangi
5525dd902b
Update external test commits
2026-07-10 23:29:19 -04:00
Rangi
4350a3252d
Upgrade FreeBSD testing from 14.3 to 15.1
2026-07-10 23:14:39 -04:00
Rangi
a8442bccc7
Group the two dep install commands together in Dockerfile
2026-07-10 23:12:49 -04:00
Rangi
00006a9d00
Use set -u too
2026-07-10 23:12:49 -04:00
Rangi
a383bec96e
Rename install_deps.sh to install-deps.sh for consistency
2026-07-10 23:12:49 -04:00
Rangi
226031c18b
Use #!/usr/bin/env bash, not #!/bin/bash
2026-07-10 23:12:49 -04:00
Rangi
24a896f60a
Move CI-only check-diff script to .github/
2026-07-10 23:12:49 -04:00
Rangi
a6f5e3efd1
Move CI-only check-format script to .github/
2026-07-10 23:12:49 -04:00
Rangi
c02b234bb1
Add CI job to check syntax of contrib scripts
...
Note that `zsh` is not installed in `ubuntu-slim` by default.
2026-07-10 23:12:49 -04:00
Rangi
be4c1161bd
Fix RGBGFX crash when trimming more tiles than exist after deduplication
2026-07-10 17:35:32 -04:00
Rangi
0e1e5e80f6
Use correct PRIu32 format spec for uint32_t usedTotal
2026-07-10 17:01:43 -04:00
Rangi
118f1f7543
Correct option letter in error message
2026-07-10 16:59:30 -04:00
Rangi
eaa35ed26d
Remove dead return after no-return fatal call
2026-07-10 14:36:46 -04:00
Rangi
7b39bcd412
Refactor expression for clarity
...
`tileData[realY + 1 % options.bitDepth]` relied on order of
operations and the fact that `1 % 1 == 0` but `1 % 2 == 1` for
correct indexing. However, it was not obvious at first glance,
and confusable with the more common `(base + offset) % size`
pattern. (And would need changing anyway if we ever support 4bpp.)
2026-07-10 14:30:25 -04:00
Rangi
255cd7f7f6
Fix a typo in a comment
2026-07-10 14:29:32 -04:00
Rangi
b8011947a8
Correct assumption to avoid UB with 1 << 31
2026-07-09 21:36:34 -04:00
Rangi
39e7e064c9
Print correct color set limit value in error message
2026-07-09 21:29:02 -04:00
Rangi
7b97d7ce15
Fix RGBGFX crash on deduplicating transparent tiles
2026-07-09 21:24:59 -04:00
Rangi
c667bac93a
Use trailing return type for begin()/end()
2026-07-08 16:57:52 -04:00
Rangi
db96144d49
Use [[nodiscard]] instead of [[gnu::warn_unused_result]]
2026-07-08 16:44:15 -04:00
Rangi
276a1a7952
Use const_cast more precisely to remove const without changing type
2026-07-08 16:42:53 -04:00
Rangi
b219e03b38
Use more structured bindings
2026-07-08 16:38:32 -04:00
Rangi
824ebd80f9
Use [[fallthrough]]; attribute instead of // fallthrough comment
2026-07-08 16:30:52 -04:00
Rangi
5aedf31b46
Prevent 32-bit multiplication overflow
...
Basically impossible to achieve, but just in case
2026-07-07 17:02:46 -04:00
Rangi
d94d0bcc2f
Make explicit the assumption that targetFileName is checked before ever calling printDep
2026-07-07 17:02:46 -04:00
Rangi
ed8e3e4d02
Reset errno = 0 before parseWholeNumber calls and errno == ERANGE checks
2026-07-07 17:02:46 -04:00
Rangi
30fd4514dc
Add fail-safe for invalid RPN commands in bad object files
2026-07-07 17:02:46 -04:00
Rangi
08e83601f5
Fix CRLF check in parsing SDAS objects
2026-07-07 17:02:46 -04:00
Rangi
e606f4e997
Fix condition for invalid bank range check ( #2016 )
2026-07-07 17:02:35 -04:00
Rangi
9008d8391c
Consistently use sudo apt install -Uyq in workflows (two other cases)
2026-07-07 02:57:48 -04:00
Rangi
21682e8814
Consistently handle negative shifted macro args ( #2014 )
...
Negative macro arguments count from the end, i.e. `\<-1>`
is equivalent to `\<_NARG>`, even after `shift`ing them.
Negative arguments cannot be used to access shifted values.
2026-07-07 02:19:37 -04:00
Rangi
f82b0838a1
Disallow minus sign before symbol name in bracketed macro arguments ( #2015 )
...
This was being silently allowed but without actually negating the symbol's value
2026-07-07 00:42:09 -04:00
Rangi
dabd0a08d2
Remove impossible condition (uint64_t > UINT64_MAX)
2026-07-06 23:08:05 -04:00
Rangi
c3e10dbb03
Safeguard against localtime or gmtime failure
2026-07-06 23:05:19 -04:00
Rangi
3883c2a2b8
Reuse scrambleLimit instead of its equivalent expression
2026-07-06 22:50:31 -04:00
Rangi
cd0caaaceb
Clarify comment about -Wno-* behavior with parametric warnings
2026-07-06 22:44:39 -04:00
Rangi
1e4a060d9e
Guard against undefined behavior in double2fix
...
I haven't found input which triggers any, but this is more
technically correct just in case.
2026-07-06 22:38:06 -04:00
Rangi
fe3b238dea
Do not allow defining labels outside sections ( #2013 )
...
Creating a `Symbol` with `type = SYM_LABEL` but `section = nullptr`
is inconsistent and dangerous. I was not able to cause any buggy
behavior so far, but it's safer and reasonable to not create such
a symbol in the first place.
The main consequence is that `DEF(LabelOutsideSection)` will now
evaluate as 0.
2026-07-06 16:18:42 -04:00
Rangi
46a6966b70
Fix $8000_0000 % -1 to warn with -Wdiv like $8000_0000 / -1 does ( #2012 )
2026-07-06 15:08:44 -04:00
Rangi
be3fc61859
Fix included linker scripts with no newline at EOF ( #2011 )
2026-07-06 14:01:40 -04:00
Rangi
0adbb92e50
Same-line shellcheck comment explanations
...
These are obvious even with `git grep shellcheck`.
2026-07-06 04:43:08 +02:00
Rangi
09da4e001a
Use Bash arrays instead of POSIX splitting when possible
2026-07-06 04:43:08 +02:00
ISSOtm
3eb8c7e8f2
Let tests know they are being run under Cygwin
2026-07-05 20:58:50 -04:00
Rangi
189c679e13
Parallelize build jobs according to CPU count
2026-07-05 20:58:50 -04:00
Rangi
5d5000011a
Remove CMAKE_INSTALL_PARALLEL_LEVEL
...
This value "has no impact unless `INSTALL_PARALLEL` is enabled",
and since our install procedure is so simple, I don't think we need
to add that. (The `make install` commands don't use `-j` either.)
2026-07-05 20:58:50 -04:00
Rangi
f81f5fe63c
Use git clean -fdx instead of make clean in external projects
2026-07-05 20:58:50 -04:00
Rangi
6e643406a2
Refactor warning diagnostic code to reduce repeated output logic
2026-07-04 23:02:16 -04:00