summaryrefslogtreecommitdiffstats
path: root/ppapi/generators/idl_namespace.py
diff options
context:
space:
mode:
Diffstat (limited to 'ppapi/generators/idl_namespace.py')
-rw-r--r--ppapi/generators/idl_namespace.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/ppapi/generators/idl_namespace.py b/ppapi/generators/idl_namespace.py
index 98e86258..ee9c151 100644
--- a/ppapi/generators/idl_namespace.py
+++ b/ppapi/generators/idl_namespace.py
@@ -119,6 +119,10 @@ class IDLVersionMap(object):
return self.version_to_release[version]
def GetVersion(self, release):
+ if release > self.releases[-1]:
+ release = self.releases[-1]
+ elif release < self.releases[0]:
+ release = self.releases[0]
return self.release_to_version[release]