X-Git-Url: http://git.bytex64.net/?a=blobdiff_plain;f=common%2Fapp.c;h=55ec75a7ef34344bbe93ab547564b1ab4daeeb89;hb=c38b2e192d8de8ef38389cc8071881464fff99bb;hp=9d3e6cf4c53720a8ea86fe66f162e7100b79aa72;hpb=ec27db46cef1c4643087fa2eeaad2ca72228bc06;p=blerg.git diff --git a/common/app.c b/common/app.c index 9d3e6cf..55ec75a 100644 --- a/common/app.c +++ b/common/app.c @@ -1,3 +1,6 @@ +/* Blerg is (C) 2011 The Dominion of Awesome, and is distributed under a + * BSD-style license. Please see the COPYING file for details. + */ #include #include #include @@ -16,9 +19,11 @@ int parse_url_info(const char *url, struct url_info *info) { } if (len == 0) return 0; - memcpy(info->author, url, len); - info->author[len] = 0; - info->contents |= URL_INFO_AUTHOR; + if (len > MAX_TAG_LENGTH) + len = MAX_TAG_LENGTH; + memcpy(info->name, url, len); + info->name[len] = 0; + info->contents |= URL_INFO_NAME; if (c == NULL || c[1] == 0) return info->contents;