summaryrefslogtreecommitdiff
path: root/src/parse/pattern.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/parse/pattern.cpp')
-rw-r--r--src/parse/pattern.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/parse/pattern.cpp b/src/parse/pattern.cpp
index cd73c378..53c0cfe8 100644
--- a/src/parse/pattern.cpp
+++ b/src/parse/pattern.cpp
@@ -224,7 +224,7 @@ AST::Pattern Parse_PatternReal1(TokenStream& lex, bool is_refutable)
{
auto dt = tok.datatype();
// TODO: Ensure that the type is ANY or a signed integer
- return AST::Pattern( AST::Pattern::TagValue(), lex.end_span(ps), AST::Pattern::Value::make_Integer({dt, -tok.intval()}) );
+ return AST::Pattern( AST::Pattern::TagValue(), lex.end_span(ps), AST::Pattern::Value::make_Integer({dt, ~tok.intval() + 1}) );
}
else if( tok.type() == TOK_FLOAT )
{