switchbrew / libnx

Library for Switch Homebrew
https://switchbrew.github.io/libnx/
ISC License
1.27k stars 174 forks source link

service: Static assert arguments aren't pointers to prevent failure-to-deref #623

Closed SciresM closed 1 year ago

SciresM commented 1 year ago

I got very frustrated just now by failing to dereference an output pointer argument, so I added a static assertion that the input/output to the service dispatch macros aren't pointers.

This immediately caught three cases where we failed to invoke dispatch function correctly, so this also fixes those.