Merge branch 'raysan5:master' into master
This commit is contained in:
commit
e6843aac34
7
src/external/jar_xm.h
vendored
7
src/external/jar_xm.h
vendored
|
|
@ -232,6 +232,13 @@ uint64_t jar_xm_get_remaining_samples(jar_xm_context_t* ctx);
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
#ifdef DEBUG
|
||||||
|
// Undefine DEBUG to avoid external redefinition warnings/conflicts
|
||||||
|
// This is probably a common definition for
|
||||||
|
// many external build systems' debug configurations
|
||||||
|
#undef DEBUG
|
||||||
|
#endif
|
||||||
|
|
||||||
#if JAR_XM_DEBUG //JAR_XM_DEBUG defined as 0
|
#if JAR_XM_DEBUG //JAR_XM_DEBUG defined as 0
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#define DEBUG(fmt, ...) do { \
|
#define DEBUG(fmt, ...) do { \
|
||||||
|
|
|
||||||
20
src/rcore.c
20
src/rcore.c
|
|
@ -3688,12 +3688,16 @@ static void ScanDirectoryFiles(const char *basePath, FilePathList *files, const
|
||||||
(strcmp(dp->d_name, "..") != 0))
|
(strcmp(dp->d_name, "..") != 0))
|
||||||
{
|
{
|
||||||
#if defined(_WIN32)
|
#if defined(_WIN32)
|
||||||
sprintf(path, "%s\\%s", basePath, dp->d_name);
|
int pathLength = snprintf(path, MAX_FILEPATH_LENGTH - 1, "%s\\%s", basePath, dp->d_name);
|
||||||
#else
|
#else
|
||||||
sprintf(path, "%s/%s", basePath, dp->d_name);
|
int pathLength = snprintf(path, MAX_FILEPATH_LENGTH - 1, "%s/%s", basePath, dp->d_name);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (filter != NULL)
|
if ((pathLength < 0) || (pathLength >= MAX_FILEPATH_LENGTH))
|
||||||
|
{
|
||||||
|
TRACELOG(LOG_WARNING, "FILEIO: Path longer than %d characters (%s...)", MAX_FILEPATH_LENGTH, basePath);
|
||||||
|
}
|
||||||
|
else if (filter != NULL)
|
||||||
{
|
{
|
||||||
if (IsPathFile(path))
|
if (IsPathFile(path))
|
||||||
{
|
{
|
||||||
|
|
@ -3742,12 +3746,16 @@ static void ScanDirectoryFilesRecursively(const char *basePath, FilePathList *fi
|
||||||
{
|
{
|
||||||
// Construct new path from our base path
|
// Construct new path from our base path
|
||||||
#if defined(_WIN32)
|
#if defined(_WIN32)
|
||||||
sprintf(path, "%s\\%s", basePath, dp->d_name);
|
int pathLength = snprintf(path, MAX_FILEPATH_LENGTH - 1, "%s\\%s", basePath, dp->d_name);
|
||||||
#else
|
#else
|
||||||
sprintf(path, "%s/%s", basePath, dp->d_name);
|
int pathLength = snprintf(path, MAX_FILEPATH_LENGTH - 1, "%s/%s", basePath, dp->d_name);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (IsPathFile(path))
|
if ((pathLength < 0) || (pathLength >= MAX_FILEPATH_LENGTH))
|
||||||
|
{
|
||||||
|
TRACELOG(LOG_WARNING, "FILEIO: Path longer than %d characters (%s...)", MAX_FILEPATH_LENGTH, basePath);
|
||||||
|
}
|
||||||
|
else if (IsPathFile(path))
|
||||||
{
|
{
|
||||||
if (filter != NULL)
|
if (filter != NULL)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user