~elementary-os/pantheon-calculator/deb-packaging-loki

« back to all changes in this revision

Viewing changes to debian/patches/allow-both-minus-symbols.patch

  • Committer: Cody Garver
  • Date: 2017-09-20 16:08:43 UTC
  • Revision ID: cody@elementary.io-20170920160843-2wimc140k8jgp66f
Add allow-both-minus-symbols.patch

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
--- a/src/Core/Scanner.vala
 
2
+++ b/src/Core/Scanner.vala
 
3
@@ -79,7 +79,7 @@
 
4
                         else
 
5
                             throw new SCANNER_ERROR.ALPHA_INVALID (_("'%s' is invalid."), t.content);
 
6
 
 
7
-                    } else if (t.token_type == TokenType.OPERATOR && t.content == "-") {
 
8
+                    } else if (t.token_type == TokenType.OPERATOR && (t.content == "-" || t.content == "−")) {
 
9
                         if (last_token == null || (last_token != null && last_token.token_type != TokenType.NUMBER &&
 
10
                         last_token.token_type != TokenType.P_RIGHT)) {
 
11
                             next_number_negative = true;