diff options
-rwxr-xr-x | utils/analysis/cmp-plugins-size.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/utils/analysis/cmp-plugins-size.py b/utils/analysis/cmp-plugins-size.py index 27ffb0fcae..05c97486aa 100755 --- a/utils/analysis/cmp-plugins-size.py +++ b/utils/analysis/cmp-plugins-size.py @@ -72,9 +72,11 @@ def map_info(map): f = open(map).read() # read map content s = re.search('^PLUGIN_RAM *0x(\d|[abcdef])*', f, re.MULTILINE) + if not s: return (name, 0) plugin_start = re.sub('^PLUGIN_RAM *0x0*', '', f[s.start():s.end()]) s = re.search('^\.pluginend *0x(\d|[abcdef])*', f, re.MULTILINE) + if not s: return (name, 0) plugin_end = re.sub('^\.pluginend *0x0*', '', f[s.start():s.end()]) size = int(plugin_end, 16) - int(plugin_start, 16) |