This commit is contained in:
OBattler
2023-04-07 00:52:34 +02:00
2 changed files with 11 additions and 7 deletions

10
.ci/Jenkinsfile vendored
View File

@@ -283,13 +283,17 @@ pipeline {
def archName = archNames[archSlug] def archName = archNames[archSlug]
if (os == 'macOS') if (os == 'macOS')
archName = archNamesMac[archSlug] archName = archNamesMac[archSlug]
dir("${dynarecNames[dynarec]}/$os - $archName") { dir(dynarecNames[dynarec]) {
ret = runBuild("-b \"$packageName\" \"$arch\" ${presetFlags[preset]} ${dynarecFlags[dynarec]} ${osFlags[os]} $buildFlags") dir("$os - $archName") {
ret = runBuild("-b \"$packageName\" \"$arch\" ${presetFlags[preset]} ${dynarecFlags[dynarec]} ${osFlags[os]} $buildFlags")
writeFile file: '.forcedir', text: ''
}
writeFile file: '.forcedir', text: ''
} }
if (ret == 0) { if (ret == 0) {
/* Archive resulting artifacts. */ /* Archive resulting artifacts. */
archiveArtifacts artifacts: "**/**/$packageName*" archiveArtifacts artifacts: "**/$packageName*, **/.forcedir"
} else { } else {
/* Fail this stage. */ /* Fail this stage. */
failStage() failStage()

View File

@@ -218,7 +218,7 @@ viso_convert_utf8(wchar_t *dest, const char *src, ssize_t buf_size)
return p - dest; return p - dest;
} }
#define VISO_WRITE_STR_FUNC(func, dst_type, src_type, converter) \ #define VISO_WRITE_STR_FUNC(func, dst_type, src_type, converter, bounds_chk) \
static void \ static void \
func(dst_type *dest, const src_type *src, ssize_t buf_size, int charset) \ func(dst_type *dest, const src_type *src, ssize_t buf_size, int charset) \
{ \ { \
@@ -284,7 +284,7 @@ viso_convert_utf8(wchar_t *dest, const char *src, ssize_t buf_size)
\ \
default: \ default: \
/* Not valid for D or A, but valid for filenames. */ \ /* Not valid for D or A, but valid for filenames. */ \
if ((charset < VISO_CHARSET_FN) || (c > 0xffff)) \ if ((charset < VISO_CHARSET_FN) || (bounds_chk)) \
c = '_'; \ c = '_'; \
break; \ break; \
} \ } \
@@ -293,8 +293,8 @@ viso_convert_utf8(wchar_t *dest, const char *src, ssize_t buf_size)
*dest++ = converter(c); \ *dest++ = converter(c); \
} \ } \
} }
VISO_WRITE_STR_FUNC(viso_write_string, uint8_t, char, ) VISO_WRITE_STR_FUNC(viso_write_string, uint8_t, char, , 0)
VISO_WRITE_STR_FUNC(viso_write_wstring, uint16_t, wchar_t, cpu_to_be16) VISO_WRITE_STR_FUNC(viso_write_wstring, uint16_t, wchar_t, cpu_to_be16, c > 0xffff)
static int static int
viso_fill_fn_short(char *data, const viso_entry_t *entry, viso_entry_t **entries) viso_fill_fn_short(char *data, const viso_entry_t *entry, viso_entry_t **entries)