A feature-rich command-line audio/video downloader
[swfinterp] Implement equals opcode
Philipp Hagemeistereb5376044ca2
diff --git a/test/swftests/EqualsOperator.as b/test/swftests/EqualsOperator.asnew file mode 100644index 0000000000..837a69a46f--- /dev/null+++ b/test/swftests/EqualsOperator.as@@ -0,0 +1,10 @@+// input: []+// output: false++package {+public class EqualsOperator {+ public static function main():Boolean{+ return 1 == 2;+ }+}+}diff --git a/youtube_dl/swfinterp.py b/youtube_dl/swfinterp.pyindex 0ce8474ca7..1e8b26ecc4 100644--- a/youtube_dl/swfinterp.py+++ b/youtube_dl/swfinterp.py@@ -629,6 +629,11 @@ class SWFInterpreter(object):value1 = stack.pop()res = value1 % value2stack.append(res)+ elif opcode == 171: # equals+ value2 = stack.pop()+ value1 = stack.pop()+ result = value1 == value2+ stack.append(result)elif opcode == 175: # greaterequalsvalue2 = stack.pop()value1 = stack.pop()