Fix #77035.
[mono.git] / mcs / mcs / cs-tokenizer.cs
index 77ff14f78fb59283bc47c15fbd429aed6c1484e9..83b92d2f9aa6dd9bab28880a8ea3aa241784e65e 100644 (file)
@@ -835,6 +835,11 @@ namespace Mono.CSharp
                                val = 0ul;
                                return Token.LITERAL_INTEGER;
                        }
+                       catch (FormatException) {
+                               Report.Error (1013, Location, "Invalid number");
+                               val = 0ul;
+                               return Token.LITERAL_INTEGER;
+                       }
                }
                
                int adjust_real (int t)
@@ -2310,7 +2315,7 @@ namespace Mono.CSharp
                                if ((state & REGION) != 0)
                                        Report.Error (1038, Location, "#endregion directive expected");
                                else 
-                                       Report.Error (1027, "Expected `#endif' directive");
+                                       Report.Error (1027, Location, "Expected `#endif' directive");
                        }
                                
                }