[libbdplus-devel] slot_SlotAttach(): Fix order of checks
anonymous
git at videolan.org
Thu Mar 16 11:41:18 CET 2017
libbdplus | branch: master | anonymous <anonymous at anonymous.org> | Thu Mar 16 12:36:10 2017 +0200| [2f07e12cf6d2c549702a463b439f9bd0d6bb229f] | committer: anonymous
slot_SlotAttach(): Fix order of checks
> http://git.videolan.org/gitweb.cgi/libbdplus.git/?a=commit;h=2f07e12cf6d2c549702a463b439f9bd0d6bb229f
---
src/libbdplus/bdsvm/slot.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/libbdplus/bdsvm/slot.c b/src/libbdplus/bdsvm/slot.c
index 410aabc..56c8586 100644
--- a/src/libbdplus/bdsvm/slot.c
+++ b/src/libbdplus/bdsvm/slot.c
@@ -70,12 +70,12 @@ uint32_t slot_SlotAttach(VM *vm,
PC = dlx_getPC(vm) - 4; // Pull back 4
IF = dlx_getIF(vm);
- if ( slot >= BDPLUS_NUM_SLOTS )
- return STATUS_INVALID_PARAMETER;
-
if (slot == 0xFFFFFFFF)
return bdplus_new_slot(dlx_getApp(vm));
+ if ( slot >= BDPLUS_NUM_SLOTS )
+ return STATUS_INVALID_PARAMETER;
+
// Use 16 bytes from code_start,
// Use codeLen*4 bytes from PC
// Use IF
More information about the libbdplus-devel
mailing list