- paper_height = 0;
- as_warn ("strange paper height, set to no form");
- }
- if (*input_line_pointer == ',')
- {
- input_line_pointer++;
- paper_width = get_absolute_expression ();
+ paper_height = get_absolute_expression ();
+
+ if (paper_height < 0 || paper_height > 1000)
+ {
+ paper_height = 0;
+ as_warn ("strange paper height, set to no form");
+ }
+
+ if (*input_line_pointer != ',')
+ {
+ demand_empty_rest_of_line ();
+ return;
+ }
+
+ ++input_line_pointer;