]> git.codecow.com Git - Monocypher.git/commitdiff
vector_to_header now handles leading empty lines
authorLoup Vaillant <loup@loup-vaillant.fr>
Sun, 23 Feb 2020 14:50:23 +0000 (15:50 +0100)
committerLoup Vaillant <loup@loup-vaillant.fr>
Sun, 23 Feb 2020 14:50:23 +0000 (15:50 +0100)
tests/gen/vector_to_header.c

index a043398a7b5e779f5269e6ddd750eb06f634e000..ad601095215d8b7cad08f1851aa275b47ee2549d 100644 (file)
@@ -73,6 +73,11 @@ int main(int argc, char** argv)
     int   c      = getchar();
     int   nb_vec = 0;
 
+    // seek first line
+    while (!is_digit(c) && c != ':' && c != EOF) {
+        c = getchar();
+    }
+
     while (c != EOF) {
         int size = 0;
         if (c == ':') {