[Bf-blender-cvs] [cdf37eea51a] tmp-gpu-shader-descriptor-2: Fix shader-builder should exit when no parameters are given.

Jeroen Bakker noreply at git.blender.org
Wed Jan 5 12:22:29 CET 2022


Commit: cdf37eea51a60b1826d9a60db04be496717de037
Author: Jeroen Bakker
Date:   Wed Jan 5 08:08:52 2022 +0100
Branches: tmp-gpu-shader-descriptor-2
https://developer.blender.org/rBcdf37eea51a60b1826d9a60db04be496717de037

Fix shader-builder should exit when no parameters are given.

First parameter is filled with the executable name. So we needed to
check if we received the second parameter.

===================================================================

M	source/blender/gpu/intern/gpu_shader_builder.cc

===================================================================

diff --git a/source/blender/gpu/intern/gpu_shader_builder.cc b/source/blender/gpu/intern/gpu_shader_builder.cc
index 0a6b133de52..02aa5a0ca63 100644
--- a/source/blender/gpu/intern/gpu_shader_builder.cc
+++ b/source/blender/gpu/intern/gpu_shader_builder.cc
@@ -37,7 +37,7 @@
 
 int main(int argc, char const *argv[])
 {
-  if (argc < 1) {
+  if (argc < 2) {
     printf("Usage: shader_builder <data_file_to>\n");
     exit(1);
   }



More information about the Bf-blender-cvs mailing list