Skip to content

Some C code segments are difficult to read in dark mode #45

@nilsreichardt

Description

@nilsreichardt
image

I have the dark mode enabled in Anki. When I'm writing C code, some of the code segments are difficult to read (see screenshot):

Example code:

#include <stdlib.h>
#include <string.h>

int main() {
    // Allocate memory for 10 characters on the heap
    char *p = (char*) malloc(10 * sizeof(char));

    // Copy more than 10 characters into the allocated memory.
    // This results in a heap-buffer-overflow error.
    strcpy(p, "This string is too long for the allocated buffer");

    // Don't forget to free your memory
    free(p);

    return 0;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions