n-channel

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit c16d21c43716c22ff6777dbccde5fbdfd8d67dd2
parent cc1b9da20219fc14e6d7b8e6072b65bf6f961118
Author: Samdal <samdal@protonmail.com>
Date:   Sat, 22 Feb 2025 02:26:29 +0100

fix typos

Diffstat:
M_pages/about.md | 5++---
M_posts/2025-02-22-making-generic-data-structures-in-C.md | 2+-
2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/_pages/about.md b/_pages/about.md @@ -5,12 +5,11 @@ title: About ## Hi - I usually go by Drava, but my real name is Halvard Samdal. -I'm from the second largest city in Norway called Bergen. +I'm from the second largest city in Norway, Bergen. I mostly do systems programming and electronics, so that's what you will see here. -I'm currently a year away from completeing my Bachelor's, but I have a full-time job doing programming and electronics for some guys making arcade machines. +I'm currently a year away from completeing my Bachelor's in Electronic Engineering, but I have a full-time job doing programming and electronics for some guys making arcade machines. ![Couch](/assets/images/couch.png) {: style="margin-left: auto; margin-right: auto"} diff --git a/_posts/2025-02-22-making-generic-data-structures-in-C.md b/_posts/2025-02-22-making-generic-data-structures-in-C.md @@ -105,7 +105,7 @@ typedef struct { #define dyn_arr_get_sz(arr) (((_dyn_arr_header*)((u8*)(arr) - sizeof(_dyn_arr_header)))->sz) #define dyn_arr_push(arr, new_val) ( \ - arr = realloc(sizeof(_dyn_arr_header) + dyn_arr_get_sz(arr) + 1), \ + arr = realloc(sizeof(_dyn_arr_header) + (dyn_arr_get_sz(arr) + 1) * sizeof(*(arr))), \ arr[dyn_arr_get_sz(arr)-1] = new_val \ ) ```