forked from pclewis/lslint
-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #77 from Sei-Lisa/sei-list-string-key-lso
Add warning for (list)string_var or (list)key_var in LSO
- Loading branch information
Showing
7 changed files
with
68 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
default | ||
{ | ||
state_entry() | ||
{ | ||
key k = llGetObjectName(); | ||
string s = llGetKey(); | ||
|
||
list ls = | ||
(list) // $[E20021] could result in a string | ||
k; | ||
ls = ls + | ||
(list) // $[E20021] could result in a key | ||
s; | ||
|
||
if (llGetListEntryType(ls, 0) == TYPE_STRING | ||
&& llGetListEntryType(ls, 1) == TYPE_KEY) | ||
{ | ||
// This is printed! | ||
llOwnerSay("LSO has weird bugs"); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
default | ||
{ | ||
state_entry() | ||
{ | ||
key k = llGetObjectName(); | ||
string s = llGetKey(); | ||
|
||
list ls = (list)k; // no E20021 in mono | ||
ls = ls + (list)s; // no E20021 in mono | ||
|
||
if (llGetListEntryType(ls, 0) != TYPE_STRING | ||
&& llGetListEntryType(ls, 1) != TYPE_KEY) | ||
{ | ||
// Printed in Mono because it's safe | ||
llOwnerSay("Mono is safe"); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters