Commit b0894049

b08940494d82Merged

Yukihiro "Matz" Matsumoto <[email protected]> · 7 months ago · 1 file · ~1 modified

Description

fix: drop stray extra args from ao_render's PPM header printf

printf("255\n", IMAGE_WIDTH, IMAGE_HEIGHT) — the two trailing args had no corresponding format specifier and were carried over from the copy-pasted line above. Ruby silently ignores them; the C compiler correctly warns about the mismatch. Output is unchanged.

Co-Authored-By: Claude Opus 4.7 (1M context) [email protected]

Details

Commit
b08940494d82
Parent
d16ed046abcb

benchmark/bm_ao_render.rbmodifiedView file

@@ -317,7 +317,7 @@
317317 # File.open("ao.ppm", "w") do |fp|
318318 printf("P6\n")
319319 printf("%d %d\n", IMAGE_WIDTH, IMAGE_HEIGHT)
320- printf("255\n", IMAGE_WIDTH, IMAGE_HEIGHT)
320+ printf("255\n")
321321 Scene.new.render(IMAGE_WIDTH, IMAGE_HEIGHT, NSUBSAMPLES)
322322 # Scene.new.render(256, 256, 2)
323323 # end