mirror of
https://github.com/pmret/gcc-papermario.git
synced 2024-11-08 11:53:01 +01:00
Fix null pointer deref when environment variable doesn't exist. (#16)
* Fix null pointer deref when environment variable doesn't exist. Causes cpp to crash every time * Remove lines per Ethan * Add cpp to release archive * This isn't docker wanting a file list :P
This commit is contained in:
parent
feb59f3cbd
commit
f02826c5a0
20
.github/workflows/build.yml
vendored
20
.github/workflows/build.yml
vendored
@ -55,25 +55,7 @@ jobs:
|
||||
shell: bash
|
||||
run: |
|
||||
cp xgcc gcc
|
||||
tar -cf ${{ matrix.TARGET.ARCHIVE_NAME }} cc1 gcc cc1plus g++
|
||||
- name: Clean
|
||||
shell: bash
|
||||
run: |
|
||||
make clean
|
||||
- name: Configure for mips
|
||||
shell: bash
|
||||
run: |
|
||||
./configure --target=mips --prefix=/opt/cross --with-gnu-as --disable-gprof --disable-gdb --disable-werror --host=${{ matrix.TARGET.HOST }} --build=${{ matrix.TARGET.HOST }}
|
||||
- name: Make cpp
|
||||
continue-on-error: true
|
||||
shell: bash
|
||||
run: |
|
||||
make cpp CFLAGS="${{ matrix.TARGET.CFLAGS }}"
|
||||
- name: Add cpp to release archive
|
||||
shell: bash
|
||||
run: |
|
||||
tar -uf ${{ matrix.TARGET.ARCHIVE_NAME }} cpp
|
||||
gzip -9 ${{ matrix.TARGET.ARCHIVE_NAME }}
|
||||
tar -cf ${{ matrix.TARGET.ARCHIVE_NAME }} cc1 gcc cc1plus g++ cpp
|
||||
- name: Upload archive
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
|
5
cccp.c
5
cccp.c
@ -1172,6 +1172,11 @@ kanjienv_check ()
|
||||
{
|
||||
char *n64kanji_env;
|
||||
n64kanji_env = getenv("N64GCC_KANJI");
|
||||
if ( !n64kanji_env ) {
|
||||
n64kanji_flag = KANJI_OFF;
|
||||
return;
|
||||
}
|
||||
|
||||
if ( !strcasecmp( n64kanji_env, "SJIS" ) ) {
|
||||
n64kanji_flag = KANJI_SJIS;
|
||||
} else if ( !strcasecmp( n64kanji_env, "EUC" ) ) {
|
||||
|
Loading…
Reference in New Issue
Block a user