AcademySoftwareFoundation / AcademySoftwareFoundation/OpenShadingLanguage

printf "%c" format specifier doesn't work in batch mode

Open
#1,965 2 comments 0 reactions 0 assignees View on GitHub
batch shading bug
Dominant language
C++
Stars
2.3k
Forks
414
Avg merge
3d 1h
Merged PRs (30d)
10

Description

```
color C = 0.5;
printf("C = %c\n", C);
```

works in single point mode, not in batch mode. Changing to `%g` works for both.

Contributor guide

Open the contributing guide

Research direction

Reproduce the provided printf example in single-point and batch modes, comparing the %c and %g format specifiers. Trace the batch-mode printf handling and make the behavior consistent with single-point mode; done means %c prints the value correctly in both modes.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
compilers
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.