From 581e39ac203056633a627ad09167adf05753e091 Mon Sep 17 00:00:00 2001 From: Robin Haberkorn Date: Wed, 7 Nov 2012 20:34:26 +0100 Subject: check bounds when accessing the transitions table --- parser.h | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) (limited to 'parser.h') diff --git a/parser.h b/parser.h index 9cef0f6..dba304d 100644 --- a/parser.h +++ b/parser.h @@ -14,19 +14,8 @@ protected: public: State(); - inline State *& - operator [](int i) - { - return transitions[i]; - } - static gboolean input(gchar chr); - - inline State * - get_next_state(gchar chr) - { - return transitions[(int)g_ascii_toupper(chr)] ? : custom(chr); - } + State *get_next_state(gchar chr); virtual State * custom(gchar chr) -- cgit v1.2.3