ref: f867fbf66e9843d74161ec57fe12980feb9aedce
parent: e4a7eeebd622bf75651d4ab8d040eaab06283788
author: Sigrid Solveig Haflínudóttir <[email protected]>
date: Thu Jul 29 08:11:34 EDT 2021
amf0null
--- a/amf0.c
+++ b/amf0.c
@@ -8,6 +8,7 @@
Abool,
Astr,
Aobj,
+ Anull = 5,
Aarr = 8,
Aend,
Alstr = 12,
@@ -23,6 +24,12 @@
}while(0)
u8int *
+amf0null(u8int *p, u8int *e)
+{
+ return amf0byte(p, e, Anull);
+}
+
+u8int *
amf0bool(u8int *p, u8int *e, int v)
{
atleast("bool", 2);
@@ -248,6 +255,10 @@
*amf0 = nil;
switch(*p++){
+ case Anull:
+ a->type = Tnull;
+ break;
+
case Anum:
atleast("num", 8);
for(n = 0, x.u = 0; n < 8; n++)
--- a/amf0.h
+++ b/amf0.h
@@ -1,4 +1,5 @@
enum {
+ Tnull,
Tstr,
Tnum,
Tbool,
@@ -26,6 +27,7 @@
};
};
+u8int *amf0null(u8int *p, u8int *e);
u8int *amf0i16(u8int *p, u8int *e, s16int i);
u8int *amf0bool(u8int *p, u8int *e, int v);
u8int *amf0byte(u8int *p, u8int *e, u8int byte);