Skip to content

Add warnings for initialization of global variables with CreateRegion and too long string literals #12

@tdauth

Description

@tdauth

Could you add warnings for two issues with JASS and Reforged/TFT: https://www.hiveworkshop.com/threads/list-of-warcraft-iii-crashes.194706/page-4#post-3637812

The first one is this:

globals
    region r = CreateRegion()
endglobals

which is valid syntax but leads to the game crashing when saving it.

The second one is:

return "hhgiuqvycdmnndtyhcjyvngtwjeykxtngnzfwndeeiytcgduquhdghfhvkguujibvqhpbrnfuqxqrctivvgmwtigpdxgdvaxubtmbievdkbmjmmmibawhbawkwdiyjnpjfgthutaykhzgyipmzecbpzqrtbhpkhuhiyjemptjpypyjdkkxjqcmejenpeajabvbkfufiyzvizgvqxyztutjrfxqrhvtueqccfkvbvqpvfxckumwiqjmzjyypuuugnkrbjtjjvzidavcxzntpnayufkqjirivaakutxmxcvjvyvgzdqjqtmkwvkqyjmjvpfciizgdrbnzwmqcjkqedepuvptfagtfvnuxtycefqhqfqjnvdecazzgnwyrniwmzpdnerxpqwwiwwwwfnefhgxpczuudxahafjpxgzmpdtpdwgruqtbmiqiumxdaevnbqifhafghdyjwhycmhygudfptvbjbqtnkvcryhqffqyxjvucjzmawmfieaztkikrmehvygynrkwmwgupgwhffwarvyfvejncwydwkfbeygvrzfazzdbzqxgpzpppqwbpunwmcxigfudfacfvwbjipgdedwyfqidrriwvyvtfgcfwarwtdrqzffivxudqnqrrtipnuvjuvbnnggxdcaderxbvzfbprkmamxzgivwrabdajqhkexdrqttfqebmbrejdpxkubwuxnthraukyrrfjjzmwnaiddamcbhfnrxqxznmvcrjhpybbhcnxdiymiyjgivendvenbajfmfvmrxepbevcqvujvzirgjmpucbuhyebfywiitqxkehqmtqypjtzyfwmvhqbwicgaygzvqrnzfzevgjrgdgzzdzhnatyxdmdgrpghnkimffigpmxazqkbvahdrzetzzemvwakpruqxyunukjvbztyzefgwjfehweubeijbvzynfurfyqprhagkrfkgfwardfjwdyxnicfvzccrijmtecghzyrfixhxggzqvmujnuzdpixgyqmrem"

which made the old World Editor crash according to https://www.hiveworkshop.com/threads/documentation-string-type.240473/ but not anymore and leads to save games crashing.
Any string literal should not be longer than 1023 characters.

I am sure there are more issues like this and warnings would be quite useful.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions