diff --git a/src/nano.c b/src/nano.c
index fe038f5cd297b35b1143a0b475aa2da4c3dab04c..a39a866a9419a5472399be85ddddd19b0ce62266 100644
--- a/src/nano.c
+++ b/src/nano.c
@@ -2551,7 +2551,7 @@ int main(int argc, char **argv)
 	    continue;
 
 	/* If a position was given on the command line, go there. */
-	if (givenline > 0 || givencol > 0)
+	if (givenline != 0 || givencol != 0)
 	    do_gotolinecolumn(givenline, givencol, FALSE, FALSE);
 #ifndef DISABLE_HISTORIES
 	else if (ISSET(POS_HISTORY)) {
diff --git a/src/search.c b/src/search.c
index 152045e073ad847f74449eb081187597ddae5af5..8b7b25028c04bf0e140f09fdd111c68df3480e98 100644
--- a/src/search.c
+++ b/src/search.c
@@ -859,10 +859,10 @@ void do_gotolinecolumn(ssize_t line, ssize_t column, bool use_answer,
 	    return;
 	}
     } else {
-	if (line < 1)
+	if (line == 0)
 	    line = openfile->current->lineno;
 
-	if (column < 1)
+	if (column == 0)
 	    column = openfile->placewewant + 1;
     }