b069c93b99
Calculator is an application that solves mathematical equations and is suitable as a default application in a Desktop environment feedback/ok aja@
27 lines
927 B
Plaintext
27 lines
927 B
Plaintext
$OpenBSD: patch-src_equation-lexer_vala,v 1.1.1.1 2013/03/29 15:08:03 jasper Exp $
|
|
|
|
commit 3c55d33e6953fb49b2dc5f3ea4dd72438e106539
|
|
Author: PioneerAxon <arth.svnit@gmail.com>
|
|
Date: Tue Mar 26 02:01:54 2013 +0530
|
|
|
|
Fix crash issues due to null pointer dereference
|
|
|
|
|
|
--- src/equation-lexer.vala.orig Tue Jan 15 09:56:45 2013
|
|
+++ src/equation-lexer.vala Fri Mar 29 16:03:56 2013
|
|
@@ -276,12 +276,9 @@ public class Lexer
|
|
/* Get next token interface. Will be called by parser to get pointer to next token in token stream. */
|
|
public LexerToken get_next_token ()
|
|
{
|
|
- var token = tokens.nth_data (next_token);
|
|
- next_token++;
|
|
if (next_token >= tokens.length ())
|
|
- next_token = tokens.length ();
|
|
-
|
|
- return token;
|
|
+ return tokens.nth_data (tokens.length () - 1);
|
|
+ return tokens.nth_data (next_token++);
|
|
}
|
|
|
|
/* Roll back one lexer token. */
|