]> git.sur5r.net Git - i3/i3/blobdiff - src/commands_parser.c
layout restoring: append at the nearest split container (or workspace) (Thanks chris)
[i3/i3] / src / commands_parser.c
index 93ee38896eb96fb9f9cd63cb913875562583e904..05d39cff53790ef42ed61ab1e896a137f19a3984 100644 (file)
@@ -13,7 +13,7 @@
  * We use a hand-written parser instead of lex/yacc because our commands are
  * easy for humans, not for computers. Thus, it’s quite hard to specify a
  * context-free grammar for the commands. A PEG grammar would be easier, but
- * there’s downsides to every PEG parser generator I have come accross so far.
+ * there’s downsides to every PEG parser generator I have come across so far.
  *
  * This parser is basically a state machine which looks for literals or strings
  * and can push either on a stack. After identifying a literal or string, it
@@ -232,7 +232,7 @@ struct CommandResult *parse_command(const char *input) {
 
     /* The "<=" operator is intentional: We also handle the terminating 0-byte
      * explicitly by looking for an 'end' token. */
-    while ((walk - input) <= len) {
+    while ((size_t)(walk - input) <= len) {
         /* skip whitespace and newlines before every token */
         while ((*walk == ' ' || *walk == '\t' ||
                 *walk == '\r' || *walk == '\n') && *walk != '\0')