Mark van Renswoude
f87a8b6eb7
Implemented access point, station mode and basic web configuration page Actual lighting control is completely broken
26 lines
517 B
C++
26 lines
517 B
C++
/*
|
|
* Stairs
|
|
* Copyright 2017 (c) Mark van Renswoude
|
|
*
|
|
* https://git.x2software.net/pub/Stairs
|
|
*/
|
|
#include "charproperties.h"
|
|
#include <cstddef>
|
|
#include <string.h>
|
|
#include "debug.h"
|
|
|
|
void CharProperties::assignChar(char** field, const char* newValue)
|
|
{
|
|
if (*field != NULL)
|
|
delete *field;
|
|
|
|
if (newValue != NULL)
|
|
{
|
|
// Include the terminating null character
|
|
size_t length = strlen(newValue) + 1;
|
|
*field = new char[length];
|
|
strncpy(*field, newValue, length);
|
|
}
|
|
else
|
|
*field = NULL;
|
|
} |