Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 811adfe1 authored by Jason Sams's avatar Jason Sams Committed by Android Git Automerger
Browse files

am 5b6abb38: Merge "Fix bug in generated code for functions with inband data...

am 5b6abb38: Merge "Fix bug in generated code for functions with inband data from pointers.  Passing zero length data would desync return command stream."

* commit '5b6abb38':
  Fix bug in generated code for functions with inband data from pointers.  Passing zero length data would desync return command stream.
parents 61d8ce6f 5b6abb38
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -465,7 +465,14 @@ void printPlaybackCpp(FILE *f) {
        fprintf(f, ");\n");

        if (hasInlineDataPointers(api)) {
            fprintf(f, "    if (cmdSizeBytes == sizeof(RS_CMD_%s)) {\n", api->name);
            fprintf(f, "    size_t totalSize = 0;\n");
            for (ct2=0; ct2 < api->paramCount; ct2++) {
                if (api->params[ct2].ptrLevel) {
                    fprintf(f, "    totalSize += cmd->%s_length;\n", api->params[ct2].name);
                }
            }

            fprintf(f, "    if ((totalSize != 0) && (cmdSizeBytes == sizeof(RS_CMD_%s))) {\n", api->name);
            fprintf(f, "        con->mIO.coreSetReturn(NULL, 0);\n");
            fprintf(f, "    }\n");
        } else if (api->ret.typeName[0]) {