mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-07-27 17:41:49 +03:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 85dae94d2e | |||
| 08aa7c9087 |
@@ -381,6 +381,12 @@ public:
|
|||||||
MusicTrack(SDL_RWops *rw, const char* _id, bool _loose_extra)
|
MusicTrack(SDL_RWops *rw, const char* _id, bool _loose_extra)
|
||||||
{
|
{
|
||||||
SDL_zerop(this);
|
SDL_zerop(this);
|
||||||
|
if (rw->size(rw) <= 1)
|
||||||
|
{
|
||||||
|
// Don't bother
|
||||||
|
vlog_debug("Skipping empty music track");
|
||||||
|
goto end;
|
||||||
|
}
|
||||||
read_buf = (Uint8*) SDL_malloc(rw->size(rw));
|
read_buf = (Uint8*) SDL_malloc(rw->size(rw));
|
||||||
SDL_RWread(rw, read_buf, rw->size(rw), 1);
|
SDL_RWread(rw, read_buf, rw->size(rw), 1);
|
||||||
int err;
|
int err;
|
||||||
|
|||||||
@@ -347,7 +347,7 @@ void scriptclass::run(void)
|
|||||||
int current = 0;
|
int current = 0;
|
||||||
|
|
||||||
// Crawl through the string
|
// Crawl through the string
|
||||||
for (int i = 0; i < words[1].size(); i++)
|
for (size_t i = 0; i < words[1].size(); i++)
|
||||||
{
|
{
|
||||||
// If the current character is a number, add it to the current version part
|
// If the current character is a number, add it to the current version part
|
||||||
if (words[1][i] >= '0' && words[1][i] <= '9')
|
if (words[1][i] >= '0' && words[1][i] <= '9')
|
||||||
|
|||||||
Reference in New Issue
Block a user