Modules/UDI - GIO Metalanguage Binding, GIO UART support, init error handling
[tpg/acess2.git] / KernelLand / Modules / Interfaces / UDI / udi_lib / core / cb.c
index b4116a0..9bf8f11 100644 (file)
@@ -160,7 +160,14 @@ void udi_cb_alloc_batch(
                                // No-op        
                        }
                        
-                       cur_ofs += _udi_marshal_step(NULL, 0, &layout, NULL);
+                       size_t  sz = _udi_marshal_step(NULL, 0, &layout, NULL);
+                       if( sz == 0 ) {
+                               Log_Warning("UDI", "Metalang CB %s:%i has an invalid layout",
+                                       metalang->Name, cb_init->meta_cb_num);
+                               callback(gcb, NULL);
+                               return ;
+                       }
+                       cur_ofs += sz;
                }
        }
 

UCC git Repository :: git.ucc.asn.au