mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2025-01-11 10:39:56 -05:00
Fixes Case Insensitive Broadcast Bug
Broadcasts are case sensitive #433
This commit is contained in:
parent
aecc3bf893
commit
276ae82769
1 changed files with 6 additions and 1 deletions
|
@ -439,6 +439,11 @@ Runtime.prototype.startHats = function (requestedHatOpcode,
|
|||
}
|
||||
var instance = this;
|
||||
var newThreads = [];
|
||||
|
||||
for (var opts in optMatchFields) {
|
||||
optMatchFields[opts] = optMatchFields[opts].toUpperCase();
|
||||
}
|
||||
|
||||
// Consider all scripts, looking for hats with opcode `requestedHatOpcode`.
|
||||
this.allScriptsDo(function (topBlockId, target) {
|
||||
var potentialHatOpcode = target.blocks.getBlock(topBlockId).opcode;
|
||||
|
@ -466,7 +471,7 @@ Runtime.prototype.startHats = function (requestedHatOpcode,
|
|||
|
||||
if (optMatchFields) {
|
||||
for (var matchField in optMatchFields) {
|
||||
if (hatFields[matchField].value !==
|
||||
if (hatFields[matchField].value.toUpperCase() !==
|
||||
optMatchFields[matchField]) {
|
||||
// Field mismatch.
|
||||
return;
|
||||
|
|
Loading…
Reference in a new issue