Check if i is equal to zero instead of checking whether it is greater, since i is unsigned in Parser.hpp

Signed-off-by: Username404 <w.iron.zombie@gmail.com>
This commit is contained in:
Username404 2022-04-14 16:13:19 +02:00
parent bcda5c9b32
commit 27c8b642d6
Signed by: Username404-59
GPG Key ID: 7AB361FBB257A5D1
1 changed files with 1 additions and 1 deletions

View File

@ -45,7 +45,7 @@ namespace Parser {
switch (current.toktype) {
case NUMBER: {
long double v = stoul(current.toktext);
if (i > 0 && lexed[i - 1].toktype == HYPHEN) v = -v;
if (i != 0 && lexed[i - 1].toktype == HYPHEN) v = -v;
types::Integer::precision_type p = 0;
if (nextAre({DOT, NUMBER})) {
i += 2;