diff options
author | yenatch <yenatch@gmail.com> | 2013-11-05 14:11:04 -0500 |
---|---|---|
committer | yenatch <yenatch@gmail.com> | 2013-11-05 14:11:04 -0500 |
commit | da7b863b8e20d5d8da07d9eb44e0fd4f5f0848d0 (patch) | |
tree | 09a02add28a0d34589fce85ec2fde3da81c8eb05 /pokemontools/addresses.py | |
parent | 4a7373d8e79d17f10ebafa3ccef7b822a5b139af (diff) | |
parent | dafb5518df768f93ac94c59d4bf5981e95f7aba0 (diff) |
Merge branch 'master' of github.com:kanzure/pokemon-reverse-engineering-tools
Diffstat (limited to 'pokemontools/addresses.py')
-rw-r--r-- | pokemontools/addresses.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/pokemontools/addresses.py b/pokemontools/addresses.py new file mode 100644 index 0000000..7b9aba5 --- /dev/null +++ b/pokemontools/addresses.py @@ -0,0 +1,14 @@ +""" +Common methods used against addresses. +""" + +def is_valid_address(address): + """is_valid_rom_address""" + if address == None: + return False + if type(address) == str: + address = int(address, 16) + if 0 <= address <= 2097152: + return True + else: + return False |