-
BlyZe
- Posts: 6
- Joined: Mon Sep 09, 2024 7:04 am
Post
by BlyZe » Tue Sep 10, 2024 11:27 am
When I print an u8 value the numbers are between 100 and 1000 for some reason.
My code:
Code: Select all
typedef struct color
{
u8 R;
u8 G;
u8 B;
} color_rgb;
Code: Select all
color_rgb color;
color.R = 255;
color.G = 255;
color.B = 255;
color.R++;
printf("\x1b[7;2H\x1b[31m%u\x1b[0m", color.R);
-
WinterMute
- Site Admin
- Posts: 1969
- Joined: Tue Aug 09, 2005 3:21 am
- Location: UK
-
Contact:
Post
by WinterMute » Sat Oct 12, 2024 11:45 pm
This code prints a red 0 as I'd expect. There must be more context to your issue.
Who is online
Users browsing this forum: Bing [Bot], Google [Bot] and 1 guest