aboutsummaryrefslogtreecommitdiffhomepage
path: root/parser.h
diff options
context:
space:
mode:
authorRobin Haberkorn <robin.haberkorn@googlemail.com>2012-11-07 20:34:26 +0100
committerRobin Haberkorn <robin.haberkorn@googlemail.com>2012-11-07 20:34:26 +0100
commit581e39ac203056633a627ad09167adf05753e091 (patch)
treea33b653b8c0604dc60f794df1d294b9a2de6b666 /parser.h
parenta8d7d16fc7b857375337aa730382d225727798a4 (diff)
downloadsciteco-581e39ac203056633a627ad09167adf05753e091.tar.gz
check bounds when accessing the transitions table
Diffstat (limited to 'parser.h')
-rw-r--r--parser.h13
1 files changed, 1 insertions, 12 deletions
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)