From c28affef60afe8ba292df074214a6bc2d3e2f406 Mon Sep 17 00:00:00 2001 From: ximion Date: Mon, 23 May 2011 22:46:53 +0000 Subject: [PATCH] Fix token parsing in Milkdrop preset factory Thanks to Adam Guthrie for the fix! git-svn-id: https://projectm.svn.sourceforge.net/svnroot/projectm/trunk@1356 6778bc44-b910-0410-a7a0-be141de4315d --- src/libprojectM/MilkdropPresetFactory/Parser.cpp | 4 ++-- src/libprojectM/MilkdropPresetFactory/Parser.hpp | 2 +- src/libprojectM/MilkdropPresetFactory/PerPixelEqn.cpp | 4 ++-- src/libprojectM/MilkdropPresetFactory/PerPixelEqn.hpp | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/libprojectM/MilkdropPresetFactory/Parser.cpp b/src/libprojectM/MilkdropPresetFactory/Parser.cpp index d410028ee..ef77d7d78 100755 --- a/src/libprojectM/MilkdropPresetFactory/Parser.cpp +++ b/src/libprojectM/MilkdropPresetFactory/Parser.cpp @@ -70,7 +70,7 @@ bool Parser::tokenWrapAroundEnabled(false); token_t Parser::parseToken(std::istream & fs, char * string) { - char c; + int c; int i; if (string != NULL) @@ -1843,7 +1843,7 @@ int Parser::parse_wavecode(char * token, std::istream & fs, MilkdropPreset * pr /* Create new initial condition */ init_cond = new InitCond(param, init_val); - + if (init_cond == NULL) { if (PARSE_DEBUG) printf("parse_wavecode: new_init_cond failed!\n"); diff --git a/src/libprojectM/MilkdropPresetFactory/Parser.hpp b/src/libprojectM/MilkdropPresetFactory/Parser.hpp index 43b8d6416..8c0e19d27 100755 --- a/src/libprojectM/MilkdropPresetFactory/Parser.hpp +++ b/src/libprojectM/MilkdropPresetFactory/Parser.hpp @@ -145,7 +145,7 @@ public: static int last_token_size; static bool tokenWrapAroundEnabled; - static PerFrameEqn *parse_per_frame_eqn( std::istream & fs, int index, + static PerFrameEqn *parse_per_frame_eqn( std::istream & fs, int index, MilkdropPreset * preset); static int parse_per_pixel_eqn( std::istream & fs, MilkdropPreset * preset, char * init_string); diff --git a/src/libprojectM/MilkdropPresetFactory/PerPixelEqn.cpp b/src/libprojectM/MilkdropPresetFactory/PerPixelEqn.cpp index 68cb9135d..99ef530b6 100755 --- a/src/libprojectM/MilkdropPresetFactory/PerPixelEqn.cpp +++ b/src/libprojectM/MilkdropPresetFactory/PerPixelEqn.cpp @@ -39,7 +39,7 @@ void PerPixelEqn::evaluate(int mesh_i, int mesh_j) { GenExpr * eqn_ptr = 0; - + eqn_ptr = this->gen_expr; @@ -69,6 +69,6 @@ PerPixelEqn::PerPixelEqn(int _index, Param * _param, GenExpr * _gen_expr):index( assert(index >= 0); assert(param != 0); assert(gen_expr != 0); - + } diff --git a/src/libprojectM/MilkdropPresetFactory/PerPixelEqn.hpp b/src/libprojectM/MilkdropPresetFactory/PerPixelEqn.hpp index 10af5af96..e3a7c50ae 100755 --- a/src/libprojectM/MilkdropPresetFactory/PerPixelEqn.hpp +++ b/src/libprojectM/MilkdropPresetFactory/PerPixelEqn.hpp @@ -52,8 +52,8 @@ class PerPixelEqn { public: int index; /* used for splay tree ordering. */ int flags; /* primarily to specify if this variable is user-defined */ - Param *param; - GenExpr *gen_expr; + Param *param; + GenExpr *gen_expr; void evalPerPixelEqns( Preset *preset ); void evaluate(int mesh_i, int mesh_j);