mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-25 16:50:50 +01:00
[liba] Add a bridge for incomplete libc
For example, GLIBC doesn't provide strlcpy which we want to use Change-Id: Iebbadfd42ca8e5dc089a8fe0b670fef843a10027
This commit is contained in:
@@ -11,12 +11,7 @@ Graph::Function::Function(const char * text, KDColor color) :
|
||||
}
|
||||
|
||||
void Graph::Function::setContent(const char * c) {
|
||||
#if __GLIBC__
|
||||
// FIXME: This is ugly.
|
||||
strncpy(m_text, c, sizeof(m_text));
|
||||
#else
|
||||
strlcpy(m_text, c, sizeof(m_text));
|
||||
#endif
|
||||
if (m_expression != nullptr) {
|
||||
delete m_expression;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user