浏览代码

Fix wrong return type

`ERROR: _display_error_with_code: CanvasShaderGLES3: Fragment Program Compilation Failed:
0:166(2): error: `return' with wrong type int, in function `map_ninepatch_axis' returning float`  caused by #34704
Tritium Oxide 5 年之前
父节点
当前提交
bb6f04c9f5
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      drivers/gles3/shaders/canvas.glsl

+ 1 - 1
drivers/gles3/shaders/canvas.glsl

@@ -419,7 +419,7 @@ float map_ninepatch_axis(float pixel, float draw_size, float tex_pixel_size, flo
 			// Scale to source texture.
 			return (margin_begin + ratio * dst_area) * tex_pixel_size;
 		} else { // Shouldn't happen, but silences compiler warning.
-			return 0;
+			return 0.0;
 		}
 	}
 }