Whatever.
Unified · Split
| @@ -829,11 +829,12 @@ void ff_vk_print_shader(void *ctx, FFVkSPIRVShader *shd, int prio) · 828 unmodified lines | |||
| 829 | int line = 0; | 829 | int line = 0; |
| 830 | const char *p = shd->src.str; | 830 | const char *p = shd->src.str; |
| 831 | const char *start = p; | 831 | const char *start = p; |
| 832 | const size_t len = strlen(p); | ||
| 832 | 833 | ||
| 833 | AVBPrint buf; | 834 | AVBPrint buf; |
| 834 | av_bprint_init(&buf, 0, AV_BPRINT_SIZE_UNLIMITED); | 835 | av_bprint_init(&buf, 0, AV_BPRINT_SIZE_UNLIMITED); |
| 835 | 836 | ||
| 836 | for (int i = 0; i < strlen(p); i++) { | 837 | for (int i = 0; i < len; i++) { |
| 837 | if (p[i] == '\n') { | 838 | if (p[i] == '\n') { |
| 838 | av_bprintf(&buf, "%i\t", ++line); | 839 | av_bprintf(&buf, "%i\t", ++line); |
| 839 | av_bprint_append_data(&buf, start, &p[i] - start + 1); | 840 | av_bprint_append_data(&buf, start, &p[i] - start + 1); |