Commit d4b47d3b authored by Greg Thompson's avatar Greg Thompson Committed by Commit Bot

Fix extraction of a ranged type's maximum value in policy generator.

BUG=None
R=ljusten@chromium.org

Change-Id: I0c0f6e061c5d81e0d823d155b84dbf887867bbde
Reviewed-on: https://chromium-review.googlesource.com/889499Reviewed-by: default avatarLutz Justen <ljusten@chromium.org>
Commit-Queue: Greg Thompson <grt@chromium.org>
Cr-Commit-Position: refs/heads/master@{#532403}
parent fa5e7f0d
......@@ -518,7 +518,7 @@ class SchemaNodesGenerator:
min_value = int(schema['minimum'])
min_value_set = True
if 'maximum' in schema:
max_value = int(schema['minimum'])
max_value = int(schema['maximum'])
max_value_set = True
if min_value_set and max_value_set and min_value > max_value:
raise RuntimeError('Invalid ranged type in %s' % name)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment