Fixed a problem with a scanner error not detected when no line break at the end of the stream.
diff --git a/lib/yaml/scanner.py b/lib/yaml/scanner.py
index 8bccdc3..5228fad 100644
--- a/lib/yaml/scanner.py
+++ b/lib/yaml/scanner.py
@@ -374,7 +374,8 @@
         # Set the current intendation to -1.
         self.unwind_indent(-1)
 
-        # Reset everything (not really needed).
+        # Reset simple keys.
+        self.remove_possible_simple_key()
         self.allow_simple_key = False
         self.possible_simple_keys = {}
 
diff --git a/lib3/yaml/scanner.py b/lib3/yaml/scanner.py
index 5c2a30b..494d975 100644
--- a/lib3/yaml/scanner.py
+++ b/lib3/yaml/scanner.py
@@ -374,7 +374,8 @@
         # Set the current intendation to -1.
         self.unwind_indent(-1)
 
-        # Reset everything (not really needed).
+        # Reset simple keys.
+        self.remove_possible_simple_key()
         self.allow_simple_key = False
         self.possible_simple_keys = {}
 
diff --git a/tests/data/invalid-item-without-trailing-break.loader-error b/tests/data/invalid-item-without-trailing-break.loader-error
new file mode 100644
index 0000000..fdcf6c6
--- /dev/null
+++ b/tests/data/invalid-item-without-trailing-break.loader-error
@@ -0,0 +1,2 @@
+-
+-0
\ No newline at end of file